-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
divide by zero error for empty arrays #51
Comments
Thank you for reporting! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you for the wonderful Swift library -- I have a relatively minor issue where something like
MfArray([])
throws a divide by zero error. I fixed it in a fork by changing one line in shape2strides func in mfstructure.swift:ret[index] = prevAxisNum / max(shape[index],1)
(I simply made the divisor a minimum of 1)
Let me know if I should submit a pull request or if you would like to push the change. Thank you!
The text was updated successfully, but these errors were encountered: