[Numpy-discussion] Re: Switching default order to column-major

2023-11-16 Thread Valerio De Benedetto
Thanks to everyone for your answers. I guess the conclusion is that 
changing the default ordering will do more harm than good.

So, considering the C API, what do you advise to use to copy a 
(probably) row-major ndarray into a data structure that is always 
column-major? Like some kind of iterator that will jump across strides 
in the source array in the fastest way possible?


___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Assessment of the difficulty in porting CPU architecture for numpy

2023-11-16 Thread xuanbao via NumPy-Discussion
Hello everyone! I am working on implementing a tool to assess the complexity of 
CPU architecture porting. It primarily focuses on RISC-V architecture porting. 
In fact, the tool may have an average estimate of various architecture porting 
efforts.My focus is on the overall workload and difficulty of transplantation 
in the past and future,even if a project has already been ported.As part of my 
dataset, I have collected the **numpy** project. **I would like to gather 
community opinions to support my assessment. I appreciate your help and 
response!** Based on scanning tools, the porting complexity is determined to be 
moderate leaning towards simple, with a moderate amount of code related to the 
CPU architecture in the project.  Is this assessment accurate?Do you often have 
any opinions on personnel allocation and consumption time? I look forward to 
your help and response.
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Re: Switching default order to column-major

2023-11-16 Thread Valerio De Benedetto
Thanks to everyone for your answers. I guess the conclusion is that 
changing the default ordering will do more harm than good.

So, considering the C API, what do you advise to use to copy a 
(probably) row-major ndarray into a data structure that is always 
column-major? Like some kind of iterator that will jump across strides 
in the source array in the fastest way possible?
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Removing `np.f2py.compile`

2023-11-16 Thread Rohit Goswami
Hello.
As part of the spring cleanup for NumPy 2.0 I'm soliciting opinions on the 
removal of the numpy.f2py.compile() function (documented here 
(https://link.getmailspring.com/link/937e4c5c-47d5-40d9-89bb-8fc04b19d...@getmailspring.com/0?redirect=https%3A%2F%2Fnumpy.org%2Fdoc%2Fstable%2Ff2py%2Fusage.html%23python-module-numpy-f2py&recipient=bnVtcHktZGlzY3Vzc2lvbkBweXRob24ub3Jn)).
 The associated issue is gh-25122 
(https://link.getmailspring.com/link/937e4c5c-47d5-40d9-89bb-8fc04b19d...@getmailspring.com/1?redirect=https%3A%2F%2Fgithub.com%2Fnumpy%2Fnumpy%2Fissues%2F25122&recipient=bnVtcHktZGlzY3Vzc2lvbkBweXRob24ub3Jn).
 Here are the main points against it:
Hasn't been updated (beyond compatibility) in 18 years

Is a (not great) wrapper around subprocess.run

Leaks memory (noted in this test case 
(https://link.getmailspring.com/link/937e4c5c-47d5-40d9-89bb-8fc04b19d...@getmailspring.com/2?redirect=https%3A%2F%2Fgithub.com%2Fnumpy%2Fnumpy%2Fblob%2F9340fcaeda5aa783a76ab356a58f52b9f76debe3%2Fnumpy%2Ff2py%2Ftests%2Ftest_compile_function.py%23L26&recipient=bnVtcHktZGlzY3Vzc2lvbkBweXRob24ub3Jn))

As for why now..
After the meson transition, the -c workflow is mostly to generate a skeleton
Many of the older -c flags are not coming back (since parsing build arguments 
and forwarding them to meson is basically resurrecting distutils )

It still generates a .so file in the working directory which is weird at best
.. and likely to be very broken very often in practice

The expectation that -c based builds work exactly the same post meson is not 
correct, and removing this function would also make downstream users come check 
the new documentation 
(https://link.getmailspring.com/link/937e4c5c-47d5-40d9-89bb-8fc04b19d...@getmailspring.com/3?redirect=https%3A%2F%2Fnumpy.org%2Fdevdocs%2Ff2py%2Fusage.html%23building-a-module&recipient=bnVtcHktZGlzY3Vzc2lvbkBweXRob24ub3Jn)

Projects should generate their own subprocess.run wrappers for the post meson 
f2py , so they can set the environment variables to interact with meson or 
provide native files...

All said, it also seems to be mostly 
(https://link.getmailspring.com/link/937e4c5c-47d5-40d9-89bb-8fc04b19d...@getmailspring.com/4?redirect=https%3A%2F%2Fgithub.com%2Fsearch%3Fq%3Df2py.compile%26type%3Dcode&recipient=bnVtcHktZGlzY3Vzc2lvbkBweXRob24ub3Jn)
 (but not completely) unused. Happy to hear thoughts against / for this, though 
the default assumption is going to be remove it :)
--- Rohit
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com