serge-sans-paille / pythran

Ahead of Time compiler for numeric kernels
https://pythran.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.99k stars 193 forks source link

Numpy2 support ? #2189

Closed kif closed 5 months ago

kif commented 6 months ago

Hi Serge,

Is pythran compatible with numpy2 ? it looks like it is a blocker for building scipy ...

Do you believe it is a lot of work ?

serge-sans-paille commented 6 months ago

Hey, I haven't looked at this yet... do you have the link to the scipy issue? cc @rgommers

rgommers commented 6 months ago

We've been building SciPy against NumPy main and 2.0.0b1 for a while without any issue. So I think Pythran is in good shape. If not, can we please see a concrete bug report?

kif commented 6 months ago

I found my bug ... I got this error:

 % pythran
/opt/mamba/envs/python_3.12/lib/python3.12/importlib/__init__.py:90: UserWarning: A NumPy version >=1.22.4 and <1.29.0 is required for this version of SciPy (detected version 2.0.0b1)
  return _bootstrap._gcd_import(name[level:], package, level)
Traceback (most recent call last):
  File "/users/kieffer/.venv/py312/bin/pythran", line 5, in <module>
    from pythran.run import run
  File "/users/kieffer/.venv/py312/lib/python3.12/site-packages/pythran/run.py", line 11, in <module>
    import pythran.types.tog
  File "/users/kieffer/.venv/py312/lib/python3.12/site-packages/pythran/types/tog.py", line 10, in <module>
    from pythran.tables import MODULES, attributes
  File "/users/kieffer/.venv/py312/lib/python3.12/site-packages/pythran/tables.py", line 4631, in <module>
    save_arguments((), MODULES)
  File "/users/kieffer/.venv/py312/lib/python3.12/site-packages/pythran/tables.py", line 4577, in save_arguments
    save_arguments(module_name + (elem,), signature)
  File "/users/kieffer/.venv/py312/lib/python3.12/site-packages/pythran/tables.py", line 4577, in save_arguments
    save_arguments(module_name + (elem,), signature)
  File "/users/kieffer/.venv/py312/lib/python3.12/site-packages/pythran/tables.py", line 4581, in save_arguments
    themodule = import_module(".".join(module_name))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/mamba/envs/python_3.12/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/users/kieffer/.venv/py312/lib/python3.12/site-packages/scipy/special/__init__.py", line 777, in <module>
    from . import _ufuncs
  File "scipy/special/_ufuncs.pyx", line 1, in init scipy.special._ufuncs
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

numpy2 installed and scipy linking to numpy1

When I uninstalled scipy, pythran was working and I could rebuild scipy with numpy2 and install it. Sorry for the noise.

rgommers commented 6 months ago

Great, thanks for confirming.

SciPy 1.13.0 built against NumPy 2.0 should be out shortly, that should make this go away

bnavigator commented 5 months ago

Hmm, but did anybody run the pythran tests suite itself with numpy 2? I get this with numpy 2.0.0rc1

[ 1402s] ==================================== ERRORS ====================================
[ 1402s] _________________ ERROR collecting pythran/tests/test_cases.py _________________
[ 1402s] pythran/tests/test_cases.py:19: in <module>
[ 1402s]     TestCases.populate(TestCases)
[ 1402s] pythran/tests/__init__.py:487: in populate
[ 1402s]     specs = target.interface(name, filepath).functions
[ 1402s] pythran/tests/__init__.py:412: in interface
[ 1402s]     return spec_parser(fd.read())
[ 1402s] pythran/spec.py:550: in spec_parser
[ 1402s]     return SpecParser()(text)
[ 1402s] pythran/spec.py:506: in __call__
[ 1402s]     sty_i = spec_to_string(key, ty_i)
[ 1402s] pythran/spec.py:535: in spec_to_string
[ 1402s]     arguments_types = [pytype_to_pretty_type(t) for t in spec]
[ 1402s] pythran/spec.py:535: in <listcomp>
[ 1402s]     arguments_types = [pytype_to_pretty_type(t) for t in spec]
[ 1402s] pythran/types/conversion.py:116: in pytype_to_pretty_type
[ 1402s]     dtype = pytype_to_pretty_type(t.__args__[0])
[ 1402s] pythran/types/conversion.py:139: in pytype_to_pretty_type
[ 1402s]     raise NotImplementedError("{0}:{1}".format(type(t), t))
[ 1402s] E   NotImplementedError: <class 'type'>:<class 'numpy.bool'>
[ 1402s] _________________ ERROR collecting pythran/tests/test_cases.py _________________
[ 1402s] pythran/tests/test_cases.py:19: in <module>
[ 1402s]     TestCases.populate(TestCases)
[ 1402s] pythran/tests/__init__.py:487: in populate
[ 1402s]     specs = target.interface(name, filepath).functions
[ 1402s] pythran/tests/__init__.py:412: in interface
[ 1402s]     return spec_parser(fd.read())
[ 1402s] pythran/spec.py:550: in spec_parser
[ 1402s]     return SpecParser()(text)
[ 1402s] pythran/spec.py:506: in __call__
[ 1402s]     sty_i = spec_to_string(key, ty_i)
[ 1402s] pythran/spec.py:535: in spec_to_string
[ 1402s]     arguments_types = [pytype_to_pretty_type(t) for t in spec]
[ 1402s] pythran/spec.py:535: in <listcomp>
[ 1402s]     arguments_types = [pytype_to_pretty_type(t) for t in spec]
[ 1402s] pythran/types/conversion.py:116: in pytype_to_pretty_type
[ 1402s]     dtype = pytype_to_pretty_type(t.__args__[0])
[ 1402s] pythran/types/conversion.py:139: in pytype_to_pretty_type
[ 1402s]     raise NotImplementedError("{0}:{1}".format(type(t), t))
[ 1402s] E   NotImplementedError: <class 'type'>:<class 'numpy.bool'>
[ 1402s] _________________ ERROR collecting pythran/tests/test_cases.py _________________
[ 1402s] pythran/tests/test_cases.py:19: in <module>
[ 1402s]     TestCases.populate(TestCases)
[ 1402s] pythran/tests/__init__.py:487: in populate
[ 1402s]     specs = target.interface(name, filepath).functions
[ 1402s] pythran/tests/__init__.py:412: in interface
[ 1402s]     return spec_parser(fd.read())
[ 1402s] pythran/spec.py:550: in spec_parser
[ 1402s]     return SpecParser()(text)
[ 1402s] pythran/spec.py:506: in __call__
[ 1402s]     sty_i = spec_to_string(key, ty_i)
[ 1402s] pythran/spec.py:535: in spec_to_string
[ 1402s]     arguments_types = [pytype_to_pretty_type(t) for t in spec]
[ 1402s] pythran/spec.py:535: in <listcomp>
[ 1402s]     arguments_types = [pytype_to_pretty_type(t) for t in spec]
[ 1402s] pythran/types/conversion.py:116: in pytype_to_pretty_type
[ 1402s]     dtype = pytype_to_pretty_type(t.__args__[0])
[ 1402s] pythran/types/conversion.py:139: in pytype_to_pretty_type
[ 1402s]     raise NotImplementedError("{0}:{1}".format(type(t), t))
[ 1402s] E   NotImplementedError: <class 'type'>:<class 'numpy.bool'>
[ 1402s] _________________ ERROR collecting pythran/tests/test_cases.py _________________
[ 1402s] pythran/tests/test_cases.py:19: in <module>
[ 1402s]     TestCases.populate(TestCases)
[ 1402s] pythran/tests/__init__.py:487: in populate
[ 1402s]     specs = target.interface(name, filepath).functions
[ 1402s] pythran/tests/__init__.py:412: in interface
[ 1402s]     return spec_parser(fd.read())
[ 1402s] pythran/spec.py:550: in spec_parser
[ 1402s]     return SpecParser()(text)
[ 1402s] pythran/spec.py:506: in __call__
[ 1402s]     sty_i = spec_to_string(key, ty_i)
[ 1402s] pythran/spec.py:535: in spec_to_string
[ 1402s]     arguments_types = [pytype_to_pretty_type(t) for t in spec]
[ 1402s] pythran/spec.py:535: in <listcomp>
[ 1402s]     arguments_types = [pytype_to_pretty_type(t) for t in spec]
[ 1402s] pythran/types/conversion.py:116: in pytype_to_pretty_type
[ 1402s]     dtype = pytype_to_pretty_type(t.__args__[0])
[ 1402s] pythran/types/conversion.py:139: in pytype_to_pretty_type
[ 1402s]     raise NotImplementedError("{0}:{1}".format(type(t), t))
[ 1402s] E   NotImplementedError: <class 'type'>:<class 'numpy.bool'>
[ 1402s] ___________ ERROR collecting pythran/tests/test_numpy_ufunc_unary.py ___________
[ 1402s] pythran/tests/test_numpy_ufunc_unary.py:65: in <module>
[ 1402s]     eval('{}.{}({})'.format(module, f, test_inputs_by_type[input_type]['_scalar'][0]))
[ 1402s] <string>:1: in <module>
[ 1402s]     ???
[ 1402s] /usr/lib64/python3.10/site-packages/numpy/__init__.py:397: in __getattr__
[ 1402s]     raise AttributeError(
[ 1402s] E   AttributeError: `np.round_` was removed in the NumPy 2.0 release. Use `np.round` instead.. Did you mean: 'round'?
[ 1402s] ___________ ERROR collecting pythran/tests/test_numpy_ufunc_unary.py ___________
[ 1402s] pythran/tests/test_numpy_ufunc_unary.py:65: in <module>
[ 1402s]     eval('{}.{}({})'.format(module, f, test_inputs_by_type[input_type]['_scalar'][0]))
[ 1402s] <string>:1: in <module>
[ 1402s]     ???
[ 1402s] /usr/lib64/python3.10/site-packages/numpy/__init__.py:397: in __getattr__
[ 1402s]     raise AttributeError(
[ 1402s] E   AttributeError: `np.round_` was removed in the NumPy 2.0 release. Use `np.round` instead.. Did you mean: 'round'?
[ 1402s] ___________ ERROR collecting pythran/tests/test_numpy_ufunc_unary.py ___________
[ 1402s] pythran/tests/test_numpy_ufunc_unary.py:65: in <module>
[ 1402s]     eval('{}.{}({})'.format(module, f, test_inputs_by_type[input_type]['_scalar'][0]))
[ 1402s] <string>:1: in <module>
[ 1402s]     ???
[ 1402s] /usr/lib64/python3.10/site-packages/numpy/__init__.py:397: in __getattr__
[ 1402s]     raise AttributeError(
[ 1402s] E   AttributeError: `np.round_` was removed in the NumPy 2.0 release. Use `np.round` instead.. Did you mean: 'round'?
[ 1402s] ___________ ERROR collecting pythran/tests/test_numpy_ufunc_unary.py ___________
[ 1402s] pythran/tests/test_numpy_ufunc_unary.py:65: in <module>
[ 1402s]     eval('{}.{}({})'.format(module, f, test_inputs_by_type[input_type]['_scalar'][0]))
[ 1402s] <string>:1: in <module>
[ 1402s]     ???
[ 1402s] /usr/lib64/python3.10/site-packages/numpy/__init__.py:397: in __getattr__
[ 1402s]     raise AttributeError(
[ 1402s] E   AttributeError: `np.round_` was removed in the NumPy 2.0 release. Use `np.round` instead.. Did you mean: 'round'?
[ 1402s] =================================== FAILURES ===================================

Reopen this issue or post a new one?

bnavigator commented 5 months ago

There is more:

[ 1402s] _________________________ TestNumpyFunc1.test_alltrue0 _________________________
[ 1402s] [gw2] linux -- Python 3.10.14 /usr/bin/python3.10
[ 1402s] 
[ 1402s] self = <pythran.tests.test_numpy_func1.TestNumpyFunc1 testMethod=test_alltrue0>
[ 1402s] 
[ 1402s]     def test_alltrue0(self):
[ 1402s] >       self.run_test("def np_alltrue0(b): from numpy import alltrue ; return alltrue(b)", numpy.array([True, False, True, True]), np_alltrue0=[NDArray[bool,:]])
[ 1402s] 
[ 1402s] pythran/tests/test_numpy_func1.py:244: 
[ 1402s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[ 1402s] pythran/tests/__init__.py:302: in run_test
[ 1402s]     cxx_compiled = compile_pythrancode(
[ 1402s] pythran/toolchain.py:402: in compile_pythrancode
[ 1402s]     module, error_checker = generate_cxx(module_name, pythrancode, specs, opts,
[ 1402s] pythran/toolchain.py:146: in generate_cxx
[ 1402s]     pm, ir, docstrings = front_middle_end(module_name, code, optimizations,
[ 1402s] pythran/toolchain.py:104: in front_middle_end
[ 1402s]     ir, docstrings = frontend.parse(pm, code)
[ 1402s] pythran/frontend.py:35: in parse
[ 1402s]     check_syntax(ir)
[ 1402s] pythran/syntax.py:251: in check_syntax
[ 1402s]     SyntaxChecker().visit(node)
[ 1402s] /usr/lib64/python3.10/ast.py:418: in visit
[ 1402s]     return visitor(node)
[ 1402s] pythran/syntax.py:117: in visit_Module
[ 1402s]     self.generic_visit(node)
[ 1402s] /usr/lib64/python3.10/ast.py:426: in generic_visit
[ 1402s]     self.visit(item)
[ 1402s] /usr/lib64/python3.10/ast.py:418: in visit
[ 1402s]     return visitor(node)
[ 1402s] pythran/syntax.py:172: in visit_FunctionDef
[ 1402s]     self.generic_visit(node)
[ 1402s] /usr/lib64/python3.10/ast.py:426: in generic_visit
[ 1402s]     self.visit(item)
[ 1402s] /usr/lib64/python3.10/ast.py:418: in visit
[ 1402s]     return visitor(node)
[ 1402s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[ 1402s] 
[ 1402s] self = <pythran.syntax.SyntaxChecker object at 0x7f9afe103820>
[ 1402s] node = <gast.gast.ImportFrom object at 0x7f9afdeb8550>
[ 1402s] 
[ 1402s]     def visit_ImportFrom(self, node):
[ 1402s]         """
[ 1402s]             Check validity of imported functions.
[ 1402s]     
[ 1402s]             Check:
[ 1402s]                 - no level specific value are provided.
[ 1402s]                 - a module is provided
[ 1402s]                 - module/submodule exists in MODULES
[ 1402s]                 - imported function exists in the given module/submodule
[ 1402s]         """
[ 1402s]         if node.level:
[ 1402s]             raise PythranSyntaxError("Relative import not supported", node)
[ 1402s]         if not node.module:
[ 1402s]             raise PythranSyntaxError("import from without module", node)
[ 1402s]         module = node.module
[ 1402s]         current_module = MODULES
[ 1402s]         # Check if module exists
[ 1402s]         for path in module.split('.'):
[ 1402s]             if path not in current_module:
[ 1402s]                 raise PythranSyntaxError(
[ 1402s]                     "Module '{0}' unknown.".format(module),
[ 1402s]                     node)
[ 1402s]             else:
[ 1402s]                 current_module = current_module[path]
[ 1402s]     
[ 1402s]         # Check if imported functions exist
[ 1402s]         for alias in node.names:
[ 1402s]             if alias.name == '*':
[ 1402s]                 continue
[ 1402s]             elif alias.name not in current_module:
[ 1402s] >               raise PythranSyntaxError(
[ 1402s]                     "identifier '{0}' not found in module '{1}'".format(
[ 1402s]                         alias.name,
[ 1402s]                         module),
[ 1402s]                     node)
[ 1402s] E                 File "<string>", line 1
[ 1402s] E               pythran.syntax.PythranSyntaxError: identifier 'alltrue' not found in module 'numpy'
[ 1402s] 
[ 1402s] pythran/syntax.py:236: PythranSyntaxError
serge-sans-paille commented 5 months ago

On Sun, Apr 21, 2024 at 12:31:21PM -0700, Ben Greiner wrote:

Hmm, but did anybody run the pythran tests suite itself with numpy 2? I get this with numpy 2.0.0rc1

Yeah, reopen, I'll have a look.

serge-sans-paille commented 5 months ago

so : we already have logic in pythran to support moving numpy API, but that's not encoded in the test suite.

serge-sans-paille commented 5 months ago

@bnavigator can you confirm #2202 fixes the situation?

bnavigator commented 5 months ago

Unfortunatly, a backported patch for 0.15.0 -- I had to remove the ufunc notebook change -- still fails at a bunch of places:

pythran-0.15.0-numpy2-test.txt

[  868s] [gw7] linux -- Python 3.11.9 /usr/bin/python3.11
[  868s]
[  868s] self = <pythran.tests.test_numpy_func0.TestNumpyFunc0 testMethod=test_issctype0>
[  868s]
[  868s]     def test_issctype0(self):
[  868s] >       self.run_test("def np_issctype0(): from numpy import issctype, int32 ; a = int32 ; return issctype(a)", np_issctype0=[])
[  868s]
[  868s] pythran/tests/test_numpy_func0.py:393:
[  868s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[  868s] pythran/tests/__init__.py:302: in run_test
[  868s]     cxx_compiled = compile_pythrancode(
[  868s] pythran/toolchain.py:402: in compile_pythrancode
[  868s]     module, error_checker = generate_cxx(module_name, pythrancode, specs, opts,
[  868s] pythran/toolchain.py:146: in generate_cxx
[  868s]     pm, ir, docstrings = front_middle_end(module_name, code, optimizations,
[  868s] pythran/toolchain.py:104: in front_middle_end
[  868s]     ir, docstrings = frontend.parse(pm, code)
[  868s] pythran/frontend.py:35: in parse
[  868s]     check_syntax(ir)
[  868s] pythran/syntax.py:251: in check_syntax
[  868s]     SyntaxChecker().visit(node)
[  868s] /usr/lib64/python3.11/ast.py:418: in visit
[  868s]     return visitor(node)
[  868s] pythran/syntax.py:117: in visit_Module
[  868s]     self.generic_visit(node)
[  868s] /usr/lib64/python3.11/ast.py:426: in generic_visit
[  868s]     self.visit(item)
[  868s] /usr/lib64/python3.11/ast.py:418: in visit
[  868s]     return visitor(node)
[  868s] pythran/syntax.py:172: in visit_FunctionDef
[  868s]     self.generic_visit(node)
[  868s] /usr/lib64/python3.11/ast.py:426: in generic_visit
[  868s]     self.visit(item)
[  868s] /usr/lib64/python3.11/ast.py:418: in visit
[  868s]     return visitor(node)
[  868s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[  868s]
[  868s] self = <pythran.syntax.SyntaxChecker object at 0x7f22aaaf90d0>
[  868s] node = <gast.gast.ImportFrom object at 0x7f22aafebf10>
[  868s]
[  868s]     def visit_ImportFrom(self, node):
[  868s]         """
[  868s]             Check validity of imported functions.
[  868s]
[  868s]             Check:
[  868s]                 - no level specific value are provided.
[  868s]                 - a module is provided
[  868s]                 - module/submodule exists in MODULES
[  868s]                 - imported function exists in the given module/submodule
[  868s]         """
[  868s]         if node.level:
[  868s]             raise PythranSyntaxError("Relative import not supported", node)
[  868s]         if not node.module:
[  868s]             raise PythranSyntaxError("import from without module", node)
[  868s]         module = node.module
[  868s]         current_module = MODULES
[  868s]         # Check if module exists
[  868s]         for path in module.split('.'):
[  868s]             if path not in current_module:
[  868s]                 raise PythranSyntaxError(
[  868s]                     "Module '{0}' unknown.".format(module),
[  868s]                     node)
[  868s]             else:
[  868s]                 current_module = current_module[path]
[  868s]
[  868s]         # Check if imported functions exist
[  868s]         for alias in node.names:
[  868s]             if alias.name == '*':
[  868s]                 continue
[  868s]             elif alias.name not in current_module:
[  868s] >               raise PythranSyntaxError(
[  868s]                     "identifier '{0}' not found in module '{1}'".format(
[  868s]                         alias.name,
[  868s]                         module),
[  868s]                     node)
[  868s] E                 File "<string>", line 1
[  868s] E               pythran.syntax.PythranSyntaxError: identifier 'issctype' not found in module 'numpy'
[  868s]
[  868s] pythran/syntax.py:236: PythranSyntaxError
...
[  868s] =========================== short test summary info ============================
[  868s] FAILED pythran/tests/test_numpy_fft.py::TestNumpyIHFFT::test_ihfft_4 - Assert...
[  868s] FAILED pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_issctype0 -   ...
[  868s] FAILED pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_issctype1 -   ...
[  868s] FAILED pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_issctype2 -   ...
[  868s] FAILED pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_sometrue0 -   ...
[  868s] FAILED pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_sometrue1 -   ...
[  868s] FAILED pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_sometrue2 -   ...
[  868s] FAILED pythran/tests/test_numpy_fft.py::TestNumpyRFFT::test_rfft_4 - Assertio...
[  868s] FAILED pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_product -   Fi...
[  868s] FAILED pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_ptp0 - Attribu...
[  868s] FAILED pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_nanmin1 - Attr...
[  868s] FAILED pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_nansum1 - Attr...
[  868s] FAILED pythran/tests/test_numpy_func2.py::TestNumpyFunc2::test_asfarray0 -   ...
[  868s] FAILED pythran/tests/test_numpy_func2.py::TestNumpyFunc2::test_asfarray1 -   ...
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_gamma2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_randint4
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_geometric2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_random1
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_gumbel1
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_gumbel2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_weibull2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_laplace1
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_laplace2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_logistic1
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_logistic2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_lognormal1
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_lognormal2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_random_sample1
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_ranf1
[  868s] FAILED pythran/tests/test_numpy_linalg.py::TestNumpyLinalg::test_linalg_norm_pydoc
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_negative_binomial2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_rayleigh1
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_rayleigh2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_sample1
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_normal1
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_normal2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_chisquare2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_pareto2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_exponential1
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_poisson1
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_exponential2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_poisson2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_power2
[  868s] FAILED pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_f2 - I...
[  868s] FAILED pythran/tests/test_numpy_ufunc_unary.py::TestNumpyUFuncUnary::test_numpy_ufunc_unary_numpy_ufunc_unary_numpy_sign_complex
[  868s] FAILED pythran/tests/test_numpy_ufunc_unary.py::TestNumpyUFuncUnary::test_numpy_ufunc_unary_numpy_ufunc_unary_numpy_sign_matrix_complex
[  868s] FAILED pythran/tests/test_numpy_ufunc_unary.py::TestNumpyUFuncUnary::test_numpy_ufunc_unary_numpy_ufunc_unary_numpy_sign_scalar_complex
[  868s] ==== 47 failed, 3458 passed, 56 skipped, 220 warnings in 859.51s (0:14:19) =====

Using the source of the #2202 feature branch results in the same errors: pythran-feature-numpy2-test.txt

serge-sans-paille commented 5 months ago

Indeed, all my fault, I only tested a small subset. I think I got all of them fixed now, there was indeed a bunch of changes needed :-/

bnavigator commented 5 months ago

Looks good now. Thank you so much! pythran_py310testlog.txt

rgommers commented 5 months ago

@serge-sans-paille I listed 0.16.0 as the full-compatible version in https://github.com/numpy/numpy/issues/26191, I assume that will be correct? Or will there be a 0.15.1?

serge-sans-paille commented 5 months ago

On Sun, Apr 28, 2024 at 08:24:31PM -0700, Ralf Gommers wrote:

@.*** I listed 0.16.0 as the full-compatible version in [2] numpy/numpy#26191, I assume that will be correct? Or will there be a 0.15.1?

Correct! No minor release forecast.