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
BF: Cast input to np.repeat into int32. #789
Conversation
This looks like it could potentially be a bug in numpy. Thoughts from anyone? |
Any thoughts about this one? @matthew-brett - does this look like a numpy bug to you? I believe it's the only remaining error on the bots at the moment |
Yes, it does look like a bug in numpy, should be so for all 32-bit systems (I can replicate on 32-bit Linux) - see bug referenced above. What about initializing |
Sorry - better might be to do:
|
Yeah. You can use EDIT: intp maps to ssize_t/Py_SSize_t |
Are |
No, |
OK - using |
Running |
@@ -159,7 +159,7 @@ def lines_to_vtk_polydata(lines, colors=None): | |||
|
|||
# Get lines_array in vtk input format | |||
lines_array = [] | |||
points_per_line = np.zeros([nb_lines], np.int64) | |||
points_per_line = np.zeros([nb_lines], np.intp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could do with a comment here explaining why you're using intp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean why you are using intp instead of np.int64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. Linking back here in the comment.
On Sun, Nov 29, 2015 at 11:50 AM, Matthew Brett notifications@github.com
wrote:
In dipy/viz/utils.py
#789 (comment):@@ -159,7 +159,7 @@ def lines_to_vtk_polydata(lines, colors=None):
# Get lines_array in vtk input format lines_array = []
- points_per_line = np.zeros([nb_lines], np.int64)
- points_per_line = np.zeros([nb_lines], np.intp)
I mean why you are using intp instead of np.int64.
—
Reply to this email directly or view it on GitHub
https://github.com/nipy/dipy/pull/789/files#r46096969.
cca96b0
to
b6990a0
Compare
That seems to do the trick: http://nipy.bic.berkeley.edu/builders/dipy-py2.6-32/builds/654 |
BF: Cast input to np.repeat into int32.
Only an issue on some systems. For example:
http://nipy.bic.berkeley.edu/builders/dipy-py2.7-wheezy-sparc/builds/225/steps/shell_9/logs/stdio