-
-
Notifications
You must be signed in to change notification settings - Fork 132
Drop support for Numpy 1.12. #84
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
Conversation
In addition, closes #78 as wontfix. |
I've updated this PR with the excellent suggestions from @njsmith. @nils-werner @mrocklin Nice if you gave it a look. |
This is a radical change and needs a proper code review, but it would be a very sleek solution, if no issues pop up. Also, it should warrant a major version bump, as it is pretty backwards-incompatible :-) |
I agree with @nils-werner that this is sleek. The dependence on 1.13 is interesting. I'm fine going forward with this, but we might want to release before we merge, just so we can point people not yet on latest numpy to that version.
We haven't released in a good long while. I'll add this (and instructions) to my TODO list if no one has objections. |
Here's what I propose (in no particular order):
Even if we do the latter first, we can always make a |
Any objection to merging #72 to master, releasing, and then merging this one on top of it? I have a slight desire to keep releases in the mainline history. Happy either way though. I'd also be happy if you wanted to just skip directly to dropping numpy 1.13. |
Releases will diverge from mainline history if we make backwards incompatible changes (as we are doing here) and then have to fix bugs in old releases. This is the reason why I would prefer any backwards-incompatible changes happen on master and the older version be in a separate branch. This applies particularly to this PR and #72 because we're effectively undoing #72 by merging this, and it makes more sense to me intuitively that they should be in separate branches. However, I would still prefer to release with #72 merged for the reason that not only are we dropping support for Numpy 1.12 (I have no problem with that part), but we're also dropping support for inter-compatibility with Edit:
I assume that's a typo. We're dropping Numpy 1.12, not 1.13. I'm not in favor of dropping old versions as soon as new ones come out. ;-) |
e593fa9
to
141a025
Compare
I personally am fine with both, releasing with #72 or this PR. I don't know if if you have reservations, though. Because dropping Numpy 1.12 support only requires users to update Numpy, dropping scipy.sparse inter-op requires... well... Rewriting code. |
I'm totally fine having a commit in mainline history than we undo in a subsequent commit.
Hrm, I hadn't realized the change with support for scipy.sparse. Is this critical to achieve the nice refactor that you have here? Was it desired? |
Not a typo, just me being distracted and forgetting which versions of Numpy are out :) |
In that case, we should be good.
I added it back, I realized it was too drastic. In any case, supporting See tests for details. Edit: This happens regardless of this change. |
Ah, mul for scipy.sparse will be matrix multiplication due to the np.matrix
interface I think
…On Thu, Jan 25, 2018 at 7:57 AM, Hameer Abbasi ***@***.***> wrote:
I'm totally fine having a commit in mainline history than we undo in a
subsequent commit.
In that case, we should be good.
Hrm, I hadn't realized the change with support for scipy.sparse. Is this
critical to achieve the nice refactor that you have here? Was it desired?
I added it back, I realized it was too drastic. In any case, supporting scipy.sparse
operator COO seems to be a hit-and-miss. add and sub works fine, but mul
tries to densify and lt/gt/ne all raise TypeErrors. We should document,
at the very least, that it is recommended to convert all arrays to COO
before starting.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/mrocklin/sparse/pull/84#issuecomment-360459263>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AASszDidgI-ylW4BEDYyNm3s-53xnLMSks5tOHpCgaJpZM4Rj0qa>
.
|
I would not be surprised to see that behave oddly
…On Thu, Jan 25, 2018 at 8:00 AM, Matthew Rocklin ***@***.***> wrote:
Ah, mul for scipy.sparse will be matrix multiplication due to the
np.matrix interface I think
On Thu, Jan 25, 2018 at 7:57 AM, Hameer Abbasi ***@***.***>
wrote:
> I'm totally fine having a commit in mainline history than we undo in a
> subsequent commit.
>
> In that case, we should be good.
>
> Hrm, I hadn't realized the change with support for scipy.sparse. Is this
> critical to achieve the nice refactor that you have here? Was it desired?
>
> I added it back, I realized it was too drastic. In any case, supporting scipy.sparse
> operator COO seems to be a hit-and-miss. add and sub works fine, but mul
> tries to densify and lt/gt/ne all raise TypeErrors. We should document,
> at the very least, that it is recommended to convert all arrays to COO
> before starting.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/mrocklin/sparse/pull/84#issuecomment-360459263>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AASszDidgI-ylW4BEDYyNm3s-53xnLMSks5tOHpCgaJpZM4Rj0qa>
> .
>
|
a68fde7
to
5ccdbaa
Compare
This seems okay to merge from my side. |
I removed calls of the form |
We're only dropping support for Numpy 1.12. Scipy.sparse inter-op has been added back. This slims down our code quite a bit. |
I think this is ready for a code review + merge. :-) |
* Add tests for scipy spmatrices from the left. * Fix failing tests. * Update docs. * Add back pure Python abs support. * Drop Scipy op support * Add Scipy sparse support back. * Update docs. * Remove most .ufunc calls since Numpy doesn't have them. * Update docs.
NDArrayOperatorsMixin
.scipy.sparse.spmatrix
operations from the left (mostly).TypeError
for__array__
.