Skip to content
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

Is ravel_multi_index a new thing? #53

Closed
arokem opened this issue Aug 4, 2012 · 6 comments
Closed

Is ravel_multi_index a new thing? #53

arokem opened this issue Aug 4, 2012 · 6 comments

Comments

@arokem
Copy link
Contributor

arokem commented Aug 4, 2012

The Travis bot seems to choke on np.ravel_multi_index. Is that a new thing?

5103ERROR: dipy.tracking.tests.test_utils.test_connectivity_matrix
5104----------------------------------------------------------------------
5105Traceback (most recent call last):
5106 File "/usr/lib/pymodules/python2.7/nose/case.py", line 187, in runTest
5107 self.test(_self.arg)
5108 File "/usr/local/lib/python2.7/dist-packages/dipy/tracking/tests/test_utils.py", line 56, in test_connectivity_matrix
5109 matrix = connectivity_matrix(streamlines, label_volume, (1, 1, 1))
5110 File "/usr/local/lib/python2.7/dist-packages/dipy/tracking/utils.py", line 123, in connectivity_matrix
5111 matrix = ndbincount(endlabels, shape=(mx, mx))
5112 File "/usr/local/lib/python2.7/dist-packages/dipy/tracking/utils.py", line 151, in ndbincount
5113 x = np.ravel_multi_index(x, shape)
5114AttributeError: 'module' object has no attribute 'ravel_multi_index'
5115
5116======================================================================
5117ERROR: dipy.tracking.tests.test_utils.test_ndbincount
5118----------------------------------------------------------------------
5119Traceback (most recent call last):
5120 File "/usr/lib/pymodules/python2.7/nose/case.py", line 187, in runTest
5121 self.test(_self.arg)
5122 File "/usr/local/lib/python2.7/dist-packages/dipy/tracking/tests/test_utils.py", line 91, in test_ndbincount
5123 bc = ndbincount(x)
5124 File "/usr/local/lib/python2.7/dist-packages/dipy/tracking/utils.py", line 151, in ndbincount
5125 x = np.ravel_multi_index(x, shape)
5126AttributeError: 'module' object has no attribute 'ravel_multi_index'

@MrBago
Copy link
Contributor

MrBago commented Aug 6, 2012

ravel_multi_index is new as of numpy 1.6. Any thoughts anybody on how we should fix this?

Bago

@arokem
Copy link
Contributor Author

arokem commented Aug 9, 2012

For what it's worth, 'bincount' was also added only in 1.6, so that might also raise problems. How about using np.histogram on the ravel'ed array, with the number of bins set such that each one catches the interval containing only a single integer and then reshaping that to the shape you want (mx,mx)?

@stefanv
Copy link
Contributor

stefanv commented Aug 9, 2012

I think bincount has been around forever...

@MrBago
Copy link
Contributor

MrBago commented Aug 9, 2012

lol, I just ran into this. The minlength keyword is new as of numpy ~1.6
... Aight, I'm guna get some sleep and figure out how to deal with this
later.

Bago

On Wed, Aug 8, 2012 at 9:28 PM, Stefan van der Walt <
notifications@github.com> wrote:

I think bincount has been around forever...


Reply to this email directly or view it on GitHubhttps://github.com//issues/53#issuecomment-7604973.

@arokem
Copy link
Contributor Author

arokem commented Aug 9, 2012

Oh yeah - my bad.

On Wed, Aug 8, 2012 at 11:31 PM, MrBago notifications@github.com wrote:

lol, I just ran into this. The minlength keyword is new as of numpy ~1.6
... Aight, I'm guna get some sleep and figure out how to deal with this
later.

Bago

On Wed, Aug 8, 2012 at 9:28 PM, Stefan van der Walt <
notifications@github.com> wrote:

I think bincount has been around forever...


Reply to this email directly or view it on GitHub<
https://github.com/nipy/dipy/issues/53#issuecomment-7604973>.


Reply to this email directly or view it on GitHubhttps://github.com//issues/53#issuecomment-7606379.

@arokem
Copy link
Contributor Author

arokem commented Jan 11, 2014

Closed through #55

@arokem arokem closed this as completed Jan 11, 2014
MarcCote pushed a commit that referenced this issue Mar 3, 2018
ShreyasFadnavis pushed a commit to ShreyasFadnavis/dipy that referenced this issue Sep 20, 2018
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

No branches or pull requests

3 participants