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
There are some instances where reduce currently transforms one index into another where they don't give the same thing on scalars or rank-0 arrays. For example
This will happen in more cases after fixing #31. For now, I am adding a note to Tuple.reduce about it indicating that ndindex does not distinguish between rank-0 arrays and scalars.
We could fix this by adding an allow_rank0_equals_scalar flag to the reduce methods. If False, indices won't reduce to each other if one can produce a scalar but the other a rank-0 array. The default should likely stay as True, since False would prevent removing redundant ellipses in many cases, and for most use-cases, scalars and rank-0 arrays are interchangable.
I don't plan to implement this soon, as I don't believe I will need it.
There are some instances where
reduce
currently transforms one index into another where they don't give the same thing on scalars or rank-0 arrays. For exampleCurrently
ellipsis().reduce()
givesTuple()
.Currently the code assumes that tuples always implicitly end in an ellipsis (
Tuple.reduce
removes any trailing ellipsis) .I don't know if we should care about this distinction.
The text was updated successfully, but these errors were encountered: