Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('xleaf', 'c',
version : '1.2.1',
version : '1.2.2',
meson_version : '>=1.1.0',
default_options : ['warning_level=2'],
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "mesonpy"

[project]
name = "xleaf"
version = "1.2.1"
version = "1.2.2"
description = "Leaf and canopy radiative transfer modeling tools built on PROSPECT-D and SAIL"
readme = "README.md"
license = "MIT"
Expand Down
7 changes: 5 additions & 2 deletions xleaf/samplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

import numpy as np

# default random seed, shared across samplers for reproducible draws
SEED = 2017


class BaseSampler(abc.ABC):
"""Base class for creating random samples of leaf/canopy parameters."""
Expand Down Expand Up @@ -34,7 +37,7 @@ def sample(self) -> float:
class UniformSampler(BaseSampler):
"""Uniform random sample generator."""

def __init__(self, min: float, max: float, seed: int | None = 2017):
def __init__(self, min: float, max: float, seed: int | None = SEED):
"""Generate a uniform random sampler from a range of values.

Args:
Expand Down Expand Up @@ -65,7 +68,7 @@ def __init__(
stdv: float,
min: float | None = None,
max: float | None = None,
seed: int | None = 2017,
seed: int | None = SEED,
):
"""Generate a normal random sampler from a parameterized distribution.

Expand Down
Loading