You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The transforms.py code requires if-else logic to specially handle inputs & internal variables, depending on whether they're numpy arrays or scalar values. This special-case logic could, in most cases, be removed by representing "scalars" as zero-dimensional arrays, which would remove excess complexity from the system.
By representing the scalars as 0D-arrays, ^this could be generically refactored to v this:
out[...] =self.function(values)
Implementing this change will likely break a handful of other dependent pieces of code, since 0D-arrays don't exactly behave the same as true scalars in all situations; this should be investigated in more detail.
The text was updated successfully, but these errors were encountered:
originally discussed in #44 (comment).
The
transforms.py
code requires if-else logic to specially handle inputs & internal variables, depending on whether they're numpy arrays or scalar values. This special-case logic could, in most cases, be removed by representing "scalars" as zero-dimensional arrays, which would remove excess complexity from the system.One example of special-case logic occurs on this line here:
By representing the scalars as 0D-arrays, ^this could be generically refactored to v this:
Implementing this change will likely break a handful of other dependent pieces of code, since 0D-arrays don't exactly behave the same as true scalars in all situations; this should be investigated in more detail.
The text was updated successfully, but these errors were encountered: