Release 0.2.7
github-actions
released this
24 Nov 19:49
·
0 commits
to 11daadfdf8e7de548a2b9668272811945f392876
since this release
[0.2.7] - 2023-11-24
Changed
- The Quickstart tutorial has been updated.
- The property
Field.ndim
has now been moved intoField.domain.ndim
, as it is fundamentally a property of the domain - The
init_params
function now will inherit the default parameters from its operator, to remove any source of ambiguity. This means that it should not have any default values, and an error is raised if it does.
Removed
- The
__about__
file has been removed, as it is redundant - The function
params_map
is removed, usejax.tree_util.tree_map
instead. - Operators are now expected to return only their outputs, and not parameters. If you need to get the parameters of an operator use its
default_params
method. To minimize problems for packages relying onjaxdf
, in this release the outputs of anoperator
are filtered to keep only the first one. This will change soon to allow the user to return arbitrary PyTrees.
Added
- JaxDF
Field
s are now based on equinox. In theory, this should allow to usejaxdf
with all the scientific libraries for the jax ecosystem. In practice, please raise an issue when you encounter one of the inevitable bugs :) - The new
operator.abstract
decorator can be used to define an unimplemented operator, for specifying input arguments and docstrings. Linear
fields are now defined as equal if they have the same set of parameters and the sameDomain
.Ongrid
fields now have the method.add_dim()
, which adds an extra tailing dimension to its parameters. This is not an in-place update: the method returns a new field.- The function
jaxdf.util.get_implemented
is now exposed to the user. - Added
laplacian
operator forFiniteDifferences
fields. - JaxDF now uses standard Python logging. To set the logging level, use
jaxdf.logger.set_logging_level
, for examplejaxdf.logger.set_logging_level("DEBUG")
. The default level isINFO
. - Fields have now a handy property
.θ
which is an alias for.params
Continuous
andLinear
fields now have the.is_complex
propertyField
andDomain
are nowModules
s, which are based on fromequinox.Module
. They are entirely equivalent toequinox.Module
, but have the extra.replace
method that is used to update a single field.
Deprecated
- The property
.is_field_complex
is now deprecated in favor of.is_complex
. Same goes for.is_real
. Field.get_field
is now deprecated in favor of the__call__
method.- The
@discretization
decorator is deprecated, as nowFields
areequinox
modules. It is just not needed now, and until removed it will act as a simple pass-trough
Fixed
OnGrid.from_grid
now automatically adds a dimension at the end of the array for scalar fields, if needed- Added a custom operator for
equinox.internal._omega._Metaω
objects and Fields, which makes the library compatible withdiffrax