Dictionary with .update instead of | for python 3.7 compatibility
Broken Interface for Python < 3.9 and Jax installed
If Jax is installed the Correlated Field of nifty tries to make an instance of the nifty.re.correlated field using |= which is a python 3.9 syntax. This brakes the interface for users having an older python version and jax as well.
IMHO we should go to the .update syntax instead. If we want to use this syntax, we can consider to update the minimal python version required for using NIFTy8. @gedenhof @wmarg @pfrank
fluctuations = WrappedCall(fluctuations, name=prefix + "fluctuations")
ptree = fluctuations.domain
loglogavgslope = WrappedCall(loglogavgslope, name=prefix + "loglogavgslope")
ptree |= loglogavgslope.domain
if flexibility is not None:
flexibility = WrappedCall(flexibility, name=prefix + "flexibility")
ptree |= flexibility.domain
# Register the parameters for the spectrum
_safe_assert(log_vol is not None)
_safe_assert(rel_log_mode_len.ndim == log_vol.ndim == 1)
ptree |= {prefix + "spectrum": ShapeWithDtype((2, ) + log_vol.shape)}
if asperity is not None:
asperity = WrappedCall(asperity, name=prefix + "asperity")
ptree |= asperity.domain
Edited by Vincent Eberle