[Numpy-discussion] Deprecating matrices.

Charles R Harris charlesr.harris at gmail.com
Sat Jan 7 19:24:06 EST 2017


On Sat, Jan 7, 2017 at 4:51 PM, Ralf Gommers <ralf.gommers at gmail.com> wrote:

>
>
> On Sun, Jan 8, 2017 at 12:42 PM, Charles R Harris <
> charlesr.harris at gmail.com> wrote:
>
>>
>>
>> On Sat, Jan 7, 2017 at 4:35 PM, Ralf Gommers <ralf.gommers at gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Sun, Jan 8, 2017 at 12:26 PM, Charles R Harris <
>>> charlesr.harris at gmail.com> wrote:
>>>
>>>>
>>>>
>>>> On Sat, Jan 7, 2017 at 2:29 PM, Ralf Gommers <ralf.gommers at gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>> It looks to me like we're getting a bit off track here. The sparse
>>>>> matrices in scipy are heavily used, and despite rough edges pretty good at
>>>>> what they do. Deprecating them is not a goal.
>>>>>
>>>>> The actual goal for the exercise that started this thread (at least as
>>>>> I see it) is to remove np.matrix from numpy itself so users (that don't
>>>>> know the difference) will only use ndarrays. And the few users that prefer
>>>>> np.matrix for teaching can now switch because of @, so their preference
>>>>> should have disappeared.
>>>>>
>>>>> To reach that goal, no deprecation or backwards incompatible changes
>>>>> to scipy.sparse are needed.
>>>>>
>>>>
>>>> What is the way forward with sparse? That looks like the biggest
>>>> blocker on the road to a matrix free NumPy. I don't see moving the matrix
>>>> package elsewhere as a solution for that.
>>>>
>>>
>>> Why not?
>>>
>>>
>> Because it doesn't get rid of matrices in SciPy, not does one gain a
>> scalar multiplication operator for sparse.
>>
>
> That's a different goal though. You can reach the "get matrix out of
> numpy" goal fairly easily (docs and packaging work), but if you insist on
> coupling it to major changes to scipy.sparse (a lot more work + backwards
> compat break), then what will likely happen is: nothing.
>

Could always remove matrix from the top level namespace and make it
private. It still needs to reside someplace as long as sparse uses it.
Fixing sparse is more work, but we have three years and it won't be getting
any easier as time goes on.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20170107/fd22cb93/attachment.html>


More information about the NumPy-Discussion mailing list