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
Current ways of squeezing an array on a given dimension using rearrange are :
vals_squeezed = einx.rearrange('a 1 c -> a c', vals) # dim 'k' is not named here
vals_squeezed = einx.rearrange('a b c -> (a b) c', vals) # this is difficult to understand
Side note : trying to squeeze an array by providing b=1 raises an error :
vals_squeezed = einx.rearrange('a b c -> a c', vals, b=1)
# RuntimeError: Failed to find assignment between input and output expressions
Making rearrange be able to squeeze dimensions when their size is given as 1 could be convenient.
Yet, possibly providing a squeeze function would be more meaningful :
vals_squeezed = einx.squeeze('a b c -> a c', vals)
And btw ... thank you einx developers to help me make my array dimensions readable all along my code 👍.
The text was updated successfully, but these errors were encountered:
hprodh
changed the title
Request : Provide ability to squeeze with rearrange
Request : Provide squeeze function
Feb 8, 2025
hprodh
changed the title
Request : Provide squeeze function
Request : Provide squeeze function, or possibility to squeeze with rearrange.
Feb 8, 2025
Current ways of squeezing an array on a given dimension using
rearrange
are :Side note : trying to squeeze an array by providing
b=1
raises an error :Making
rearrange
be able to squeeze dimensions when their size is given as 1 could be convenient.Yet, possibly providing a
squeeze
function would be more meaningful :And btw ... thank you
einx
developers to help me make my array dimensions readable all along my code 👍.The text was updated successfully, but these errors were encountered: