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

Backport 3324 #3490

Merged
merged 12 commits into from Jul 2, 2013
Merged

Backport 3324 #3490

merged 12 commits into from Jul 2, 2013

Conversation

cowlicks
Copy link
Contributor

@cowlicks cowlicks commented Jul 1, 2013

This backports the fix for having boolean comparisons respect array priority. (original PR).

I need this in 1.7.x for adding boolean comparisons to sparse matrices in SciPy. PR 1 PR 2. Otherwise, comparing a sparse matrix with a dense matrix fails when the dense matrix is on the LHS.

@pv
Copy link
Member

pv commented Jul 1, 2013

Numpy master no longer supports Python 2.4, but 1.7.x still does. According to travis, some Python >2.4-ism snuck in.

(And unrelated thing: in the meantime, you can make the corresponding tests in scipy.sparse depend on Numpy version; use from distutils.version import LooseVersion for the version comparisons.)

@@ -2870,5 +2870,152 @@ def test_mem_seteventhook(self):
test_pydatamem_seteventhook_end()


class PriorityNdarray():
Copy link
Member

Choose a reason for hiding this comment

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

Probably should be PriorityNdarray(object): for Py2.4

@cowlicks
Copy link
Contributor Author

cowlicks commented Jul 1, 2013

Thanks @pv I'll add that to the tests in sparse.

@charris
Copy link
Member

charris commented Jul 2, 2013

I hadn't realized that the change was that intrusive. However, it seems to work so in it goes ;) Thanks.

charris added a commit that referenced this pull request Jul 2, 2013
@charris charris merged commit 028a055 into numpy:maintenance/1.7.x Jul 2, 2013
@cowlicks cowlicks deleted the backport-3324 branch July 2, 2013 21:35
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.

None yet

4 participants