Skip to content

Conversation

@derricw
Copy link

@derricw derricw commented Jun 28, 2022

numpy no longer contains the alen function, but it is a trivial function to implement so I have replaced it with my own.


def alen(x):
return 1 if np.isscalar(x) else len(x)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to use shape[0] to be clearer that this is supposed to return the length of the first dim.

@LarsDu
Copy link

LarsDu commented Oct 3, 2022

@meeliskull any updates on this PR? Is this being actively maintained?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants