[Numpy-discussion] Re: NEP 29 and the faster Python release cadence
Personally I would be in favor of updating NEP 29 to a support timespan in which at most 3 (minor) Python versions are supported. The development of Python is still at a high pace and NumPy is a high performance library which thrives when be able to adopt the latest Python features and having clean codebase without having "if sys.version_info[:2] < (3, n):" guards everywhere. Especially with the developments of the faster Faster CPython project and the continued improvements in type hinting support, I think shortening the support timespan a bit is reasonable, beneficial and proportional. More important, NEP 29 is adopted by many other projects, providing a signal to the ecosystem that's okay to focus on the latest Python versions. The overlap between users using a Python version more than 2.5 years old and wanting the latest features and performance is probably pretty small. Older NumPy and other project's releases will won't disappear and be usable when the Python requirements are lifted. In my opinion a 30 month support window would provide a nice balance. Each Python version is supported for over 2 minor releases, with updates on the maintenance branches extending that with another few months. You can comfortably stay a full minor Python version behind year-round and still use the latest NumPy. For even older Python versions the old NumPy releases will stay available, and it allow NumPy to move on to new Python features a full year earlier then with a 42 month support window. Which not only improves feature and performance adaptation, but also lowers maintenance, testing, backporting and CI effort. Ewout ter Hoeven (EwoutH) ___ 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] normalization of Polynomial
Hi, The new Polynomial objects includes a domain and window. How can I normalize such an object to a standard domain and window? There is the .convert method, but it returns a strange format. A minimal example: import numpy as np p =np.polynomial.Polynomial([1, 1]) x=np.linspace(0, 3, 15); y=p(x) y[1]+=.1 q=np.polynomial.Polynomial.fit(x, y, 1) print(f'p: {repr(p)}') print(f'fitted q: {repr(q)}') print(f'fitted q: {str(q)}') qc=q.convert() print(f'q.convert(): str {qc}') print(f'q.convert(): {repr(qc)}') The output of repr(qc) is: Polynomial([Polynomial([1.0217, 0.99 ], domain=[-1., 1.], window=[-1., 1.])], dtype=object, domain=[-1., 1.], window=[-1., 1.]) but I am looking for: Polynomial([1.0217, 0.99 ], domain=[-1., 1.], window=[-1., 1.]) With kind regards, Pieter Eendebak ___ 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