Skip to content

Commit

Permalink
Merge pull request #789 from arokem/casting-lines-per-points
Browse files Browse the repository at this point in the history
BF: Cast input to np.repeat into int32.
  • Loading branch information
Garyfallidis committed Nov 30, 2015
2 parents e6b8af9 + b6990a0 commit b16c37e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dipy/viz/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ 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)
# Using np.intp (instead of int64), because of a bug in numpy:
# https://github.com/nipy/dipy/pull/789
# https://github.com/numpy/numpy/issues/4384
points_per_line = np.zeros([nb_lines], np.intp)
current_position = 0
for i in lines_range:
current_len = len(lines[i])
Expand Down

0 comments on commit b16c37e

Please sign in to comment.