Skip to content
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

NumPy 1.25 support #8698

Closed
stuartarchibald opened this issue Jan 5, 2023 · 5 comments
Closed

NumPy 1.25 support #8698

stuartarchibald opened this issue Jan 5, 2023 · 5 comments

Comments

@stuartarchibald
Copy link
Contributor

This is an issue stub to track support for NumPy 1.25. Anticipated release date (guessing based on previous release cadence) will be sometime near the middle of 2023.

Items to address:

  • TBC
@apmasell
Copy link
Contributor

apmasell commented Jun 8, 2023

Performed an initial test with 1.25rc0 from pip and llvmlite from conda on x86-64 Ubuntu Linux with Python 3.11 coming from conda. Running the test suite using NUMPY_EXPERIMENTAL_DTYPE_API=1 python runtests.py -m 11 produced failures in the following tests:

  • Fancy indexing (numba.tests.test_fancy_indexing.TestFancyIndexingMultiDim.test_getitem) all produced errors similar to
Traceback (most recent call last):
  File "/home/andre/workspace/numba/numba/tests/test_fancy_indexing.py", line 449, in test_getitem
    self.check_getitem_indices(self.shape, idx)
  File "/home/andre/workspace/numba/numba/tests/test_fancy_indexing.py", line 409, in check_getitem_indices
    self.assertNotIn(expected.base, orig_base)
  File "/home/andre/miniconda3/envs/numpy1.25/lib/python3.11/unittest/case.py", line 1144, in assertNotIn
    if member in container:
       ^^^^^^^^^^^^^^^^^^^
ValueError: operands could not be broadcast together with shapes (5,6,7,8,9,10) (5,1,9,10) 

This test is repeated many times with different parameters, but they all fail in the same way.

  • ufuncs and comparison operators (numba.tests.test_ufuncs.TestLoopTypesInt.test_equal_Qq_?, numba.tests.test_ufuncs.TestLoopTypesInt.test_greater_Qq_?, numba.tests.test_ufuncs.TestLoopTypesInt.test_greater_equal_Qq_?, numba.tests.test_ufuncs.TestLoopTypesInt.test_greater_qQ_?, numba.tests.test_ufuncs.TestLoopTypesInt.test_less_Qq_?, numba.tests.test_ufuncs.TestLoopTypesInt.test_less_equal_qQ_?, numba.tests.test_ufuncs.TestLoopTypesInt.test_not_equal_Qq_?)
    This is for equals, but the other are similar:
Traceback (most recent call last):
  File "/home/andre/workspace/numba/numba/core/typeinfer.py", line 155, in propagate
    constraint(typeinfer)
  File "/home/andre/workspace/numba/numba/core/typeinfer.py", line 578, in __call__
    self.resolve(typeinfer, typevars, fnty)
  File "/home/andre/workspace/numba/numba/core/typeinfer.py", line 601, in resolve
    sig = typeinfer.resolve_call(fnty, pos_args, kw_args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/typeinfer.py", line 1557, in resolve_call
    return self.context.resolve_function_type(fnty, pos_args, kw_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/typing/context.py", line 213, in resolve_function_type
    raise last_exception
  File "/home/andre/workspace/numba/numba/core/typing/context.py", line 196, in resolve_function_type
    res = self._resolve_user_function_type(func, args, kws)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/typing/context.py", line 248, in _resolve_user_function_type
    return func.get_call_type(self, args, kws)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/types/functions.py", line 331, in get_call_type
    failures.raise_error()
  File "/home/andre/workspace/numba/numba/core/types/functions.py", line 227, in raise_error
    raise errors.TypingError(self.format())
numba.core.errors.TypingError: No implementation of function Function(<ufunc 'equal'>) found for signature:
 
 >>> equal(array(uint64, 1d, C), array(int64, 1d, C), array(bool, 1d, C))
 
There are 2 candidate implementations:
  - Of which 2 did not match due to:
  Overload in function 'Numpy_rules_ufunc.generic': File: numba/core/typing/npydecl.py: Line 97.
    With argument(s): '(array(uint64, 1d, C), array(int64, 1d, C), array(bool, 1d, C))':
   Rejected as the implementation raised a specific error:
     TypingError: ufunc 'equal' using the loop 'Qq->?' not supported in this mode
       Traceback (most recent call last):
         File "/home/andre/workspace/numba/numba/core/types/functions.py", line 308, in get_call_type
           sig = temp.apply(nolitargs, nolitkws)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         File "/home/andre/workspace/numba/numba/core/typing/templates.py", line 351, in apply
           sig = generic(args, kws)
                 ^^^^^^^^^^^^^^^^^^
         File "/home/andre/workspace/numba/numba/core/typing/npydecl.py", line 111, in generic
           raise TypingError(msg=msg.format(ufunc.__name__, ufunc_loop.ufunc_sig))
       numba.core.errors.TypingError: ufunc 'equal' using the loop 'Qq->?' not supported in this mode
  raised from /home/andre/workspace/numba/numba/core/typing/npydecl.py:111

During: resolving callee type: Function(<ufunc 'equal'>)
During: typing of call at <string> (2)


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/andre/workspace/numba/numba/tests/test_ufuncs.py", line 1472, in test_template
    self._check_loop(fn, ufunc, loop)
  File "/home/andre/workspace/numba/numba/tests/test_ufuncs.py", line 1418, in _check_loop
    self._check_ufunc_with_dtypes(fn, ufunc, letter_types)
  File "/home/andre/workspace/numba/numba/tests/test_ufuncs.py", line 1434, in _check_ufunc_with_dtypes
    cfunc = njit(arg_nbty)(fn)
            ^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/decorators.py", line 241, in wrapper
    disp.compile(sig)
  File "/home/andre/workspace/numba/numba/core/dispatcher.py", line 965, in compile
    cres = self._compiler.compile(args, return_type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/dispatcher.py", line 129, in compile
    raise retval
  File "/home/andre/workspace/numba/numba/core/dispatcher.py", line 139, in _compile_cached
    retval = self._compile_core(args, return_type)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/dispatcher.py", line 152, in _compile_core
    cres = compiler.compile_extra(self.targetdescr.typing_context,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/compiler.py", line 762, in compile_extra
    return pipeline.compile_extra(func)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/compiler.py", line 460, in compile_extra
    return self._compile_bytecode()
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/compiler.py", line 528, in _compile_bytecode
    return self._compile_core()
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/compiler.py", line 507, in _compile_core
    raise e
  File "/home/andre/workspace/numba/numba/core/compiler.py", line 494, in _compile_core
    pm.run(self.state)
  File "/home/andre/workspace/numba/numba/core/compiler_machinery.py", line 368, in run
    raise patched_exception
  File "/home/andre/workspace/numba/numba/core/compiler_machinery.py", line 356, in run
    self._runPass(idx, pass_inst, state)
  File "/home/andre/workspace/numba/numba/core/compiler_lock.py", line 35, in _acquire_compile_lock
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/compiler_machinery.py", line 311, in _runPass
    mutated |= check(pss.run_pass, internal_state)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/compiler_machinery.py", line 273, in check
    mangled = func(compiler_state)
              ^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/typed_passes.py", line 110, in run_pass
    typemap, return_type, calltypes, errs = type_inference_stage(
                                            ^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/typed_passes.py", line 88, in type_inference_stage
    errs = infer.propagate(raise_errors=raise_errors)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/core/typeinfer.py", line 1086, in propagate
    raise errors[0]
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function(<ufunc 'equal'>) found for signature:
 
 >>> equal(array(uint64, 1d, C), array(int64, 1d, C), array(bool, 1d, C))
 
There are 2 candidate implementations:
  - Of which 2 did not match due to:
  Overload in function 'Numpy_rules_ufunc.generic': File: numba/core/typing/npydecl.py: Line 97.
    With argument(s): '(array(uint64, 1d, C), array(int64, 1d, C), array(bool, 1d, C))':
   Rejected as the implementation raised a specific error:
     TypingError: ufunc 'equal' using the loop 'Qq->?' not supported in this mode
       Traceback (most recent call last):
         File "/home/andre/workspace/numba/numba/core/types/functions.py", line 308, in get_call_type
           sig = temp.apply(nolitargs, nolitkws)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         File "/home/andre/workspace/numba/numba/core/typing/templates.py", line 351, in apply
           sig = generic(args, kws)
                 ^^^^^^^^^^^^^^^^^^
         File "/home/andre/workspace/numba/numba/core/typing/npydecl.py", line 111, in generic
           raise TypingError(msg=msg.format(ufunc.__name__, ufunc_loop.ufunc_sig))
       numba.core.errors.TypingError: ufunc 'equal' using the loop 'Qq->?' not supported in this mode
  raised from /home/andre/workspace/numba/numba/core/typing/npydecl.py:111

During: resolving callee type: Function(<ufunc 'equal'>)
During: typing of call at <string> (2)


File "<string>", line 2:
<source missing, REPL/exec in use?>
  • Numeric differences
======================================================================
FAIL: test_explicit_output (numba.tests.test_array_exprs.TestArrayExpressions.test_explicit_output)
Check that ufunc calls with explicit outputs are not rewritten.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/andre/workspace/numba/numba/tests/test_array_exprs.py", line 387, in test_explicit_output
    ns = self._test_explicit_output_function(explicit_output)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/tests/test_array_exprs.py", line 247, in _test_explicit_output_function
    self.assertPreciseEqual(expected, run_func(control_cfunc))
  File "/home/andre/workspace/numba/numba/tests/support.py", line 431, in assertPreciseEqual
    self.fail("when comparing %s and %s: %s" % (first, second, failure_msg))
AssertionError: when comparing [2.         2.54030231 2.58385316 3.0100075  4.34635638 6.28366219
 7.96017029 8.75390225 8.85449997 9.08886974] and [2.         2.54030231 2.58385316 3.0100075  4.34635638 6.28366219
 7.96017029 8.75390225 8.85449997 9.08886974]: 8.753902254343306 != 8.753902254343304
======================================================================
FAIL: test_index_ufunc (numba.tests.test_extending.TestPandasLike.test_index_ufunc)
Check Numpy ufunc on an Index object.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/andre/workspace/numba/numba/tests/test_extending.py", line 641, in test_index_ufunc
    self.assertPreciseEqual(ii._data, np.cos(np.sin(i._data)))
  File "/home/andre/workspace/numba/numba/tests/support.py", line 431, in assertPreciseEqual
    self.fail("when comparing %s and %s: %s" % (first, second, failure_msg))
AssertionError: when comparing [0.60858395 0.54922627 0.57440088] and [0.60858395 0.54922627 0.57440088]: 0.549226270051226 != 0.5492262700512262
======================================================================
FAIL: test_series_ufunc (numba.tests.test_extending.TestPandasLike.test_series_ufunc)
Check Numpy ufunc on an Series object.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/andre/workspace/numba/numba/tests/test_extending.py", line 688, in test_series_ufunc
    self.assertPreciseEqual(ss._values, np.cos(np.sin(s._values)))
  File "/home/andre/workspace/numba/numba/tests/support.py", line 431, in assertPreciseEqual
    self.fail("when comparing %s and %s: %s" % (first, second, failure_msg))
AssertionError: when comparing [0.66636675 0.61430028 0.99005909] and [0.66636675 0.61430028 0.99005909]: 0.9900590857598653 != 0.9900590857598652
======================================================================
FAIL: test_lift_objectmode_issue_4223 (numba.tests.test_looplifting.TestLoopLiftingInAction.test_lift_objectmode_issue_4223)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/andre/workspace/numba/numba/tests/test_looplifting.py", line 597, in test_lift_objectmode_issue_4223
    self.assertPreciseEqual(got[0], expected[0])
  File "/home/andre/workspace/numba/numba/tests/support.py", line 431, in assertPreciseEqual
    self.fail("when comparing %s and %s: %s" % (first, second, failure_msg))
AssertionError: when comparing [ 0.00000000e+00  6.00000000e-01  1.20594822e+00  2.25499606e-01
  4.25898681e-01 -5.33614291e-01  1.36706160e+00 -1.34021850e+00
  5.23070804e-01 -4.72923276e-01  6.62389275e-01  9.42015150e-01
  9.99429452e-02  2.70661127e-01  1.33434731e+00 -8.45334759e-01
  1.07273478e-01  1.14013924e+00 -1.20017878e+00  6.60176728e-01
 -5.13288387e-01  6.22256752e-01  9.23177334e-01  7.47942821e-02
  2.66939817e-01  1.38021976e+00 -7.71070449e-01  1.71786650e-01
  1.08956014e+00 -1.11852106e+00  5.77962602e-01  9.62511128e-02
  5.42178967e-02  1.50806287e+00 -1.13648115e+00  3.81295932e-01
  5.68968964e-01 -5.03736024e-01  9.97259578e-01 -3.04152017e-01
  2.27325903e-01  1.45115552e+00  5.31200203e-01  1.26552708e+00
  4.49615479e-01  5.74244718e-01  2.81627526e-01 -5.55711958e-02
  1.24803083e+00 -1.30446080e+00  5.57880856e-01 -1.76750748e-01
  5.99183340e-01 -2.49193497e-01  3.11842499e-01  1.47679647e+00
  5.06572976e-01  1.34770745e+00  5.55921455e-01  9.57654538e-01
  1.06527761e-01  2.73298408e-01  1.32006357e+00 -8.58385604e-01
  9.45120476e-02  1.14618688e+00 -1.21088703e+00  6.73358821e-01
 -6.10132504e-01  7.85085859e-01  4.60656269e-01 -4.11103926e-03
  3.26580591e-04  1.59875792e+00 -6.47470576e-01  6.73131965e-01
  4.88314407e-01 -1.43531673e-02  6.34683742e-01 -5.89671722e-01
  8.05539229e-01  4.66651586e-01 -2.84483309e-03  5.81166954e-03
  1.59806061e+00 -6.55665691e-01  6.65642291e-01  5.05516589e-01
 -3.09029371e-02  6.04282880e-01 -5.37791031e-01  7.31660418e-01
  7.17388196e-01  2.87923258e-03  2.09582336e-01  1.51291877e+00
 -5.45541279e-01  5.45264850e-01  5.81513540e-01 -2.59012975e-01
  6.15707728e-01 -7.29228664e-02  1.86899383e-01  1.56668756e+00
 -1.74820326e-01  1.01257748e+00 -8.14803043e-01  3.82546452e-01
  7.65785914e-01  3.17690604e-01  1.47946485e-01  9.42296260e-01
 -1.01447169e+00  8.58899708e-01 -6.71518710e-01  5.57155272e-01
  7.35556711e-01  6.82205696e-02  1.95922574e-01  1.44672464e+00
 -8.68258063e-01  2.57752763e-01  1.06528115e+00 -9.94183355e-01
  3.36854188e-01  9.01563318e-01 -7.91080141e-01  3.89324940e-01
  9.42002131e-01 -7.05306213e-01  1.77874125e-01  1.03511493e+00
 -1.07692178e+00  6.48155152e-01 -6.38193248e-03  1.70980274e-01
  1.54286829e+00 -5.45518519e-01  6.16459402e-01  4.88692425e-01
 -1.01198386e-01  7.17192815e-01 -5.29173336e-01  5.86037155e-01
  9.40771022e-01  8.81684367e-02  2.69839941e-01  1.35565985e+00
 -8.11023389e-01  1.32275578e-01  1.12185407e+00 -1.17194616e+00
  6.33613502e-01 -2.95133859e-01  3.61212438e-01  1.42041874e+00
  5.39130988e-01  1.08801684e+00  2.08607041e-01  3.07690528e-01
  1.06671040e+00 -9.01075537e-01  1.80968317e-01  1.11282890e+00
 -1.12168126e+00  5.13148194e-01  2.83793089e-01 -1.33428982e-01
  1.32203550e+00 -1.35782807e+00  4.04850318e-01  4.06241708e-01
  4.87630096e-01 -4.11765324e-01  1.11253559e+00 -6.70669447e-01
  7.69919668e-02  1.04265598e+00  7.69025304e-01  8.24861758e-01
  8.39229356e-02  2.38075738e-01  1.38940817e+00 -8.56387001e-01
  1.73032560e-01  1.11897000e+00 -1.13361490e+00  5.27945354e-01
  2.04810403e-01 -6.59807114e-02  1.42521292e+00 -1.42301957e+00
  5.49358167e-01 -5.71802265e-01  1.18920141e+00 -8.79371380e-01
 -2.82313088e-02  9.32174830e-01  9.55079327e-01  8.82345900e-01] and [ 0.00000000e+00  6.00000000e-01  1.20594822e+00  2.25499606e-01
  4.25898681e-01 -5.33614291e-01  1.36706160e+00 -1.34021850e+00
  5.23070804e-01 -4.72923276e-01  6.62389275e-01  9.42015150e-01
  9.99429452e-02  2.70661127e-01  1.33434731e+00 -8.45334759e-01
  1.07273478e-01  1.14013924e+00 -1.20017878e+00  6.60176728e-01
 -5.13288387e-01  6.22256752e-01  9.23177334e-01  7.47942821e-02
  2.66939817e-01  1.38021976e+00 -7.71070449e-01  1.71786650e-01
  1.08956014e+00 -1.11852106e+00  5.77962602e-01  9.62511127e-02
  5.42178967e-02  1.50806287e+00 -1.13648115e+00  3.81295932e-01
  5.68968965e-01 -5.03736024e-01  9.97259576e-01 -3.04152012e-01
  2.27325905e-01  1.45115553e+00  5.31200199e-01  1.26552709e+00
  4.49615500e-01  5.74244766e-01  2.81627459e-01 -5.55710992e-02
  1.24803090e+00 -1.30446091e+00  5.57881027e-01 -1.76751786e-01
  5.99183870e-01 -2.49191630e-01  3.11840912e-01  1.47679835e+00
  5.06570334e-01  1.34771486e+00  5.55928361e-01  9.57700888e-01
  1.06549144e-01  2.73306091e-01  1.32001738e+00 -8.58427494e-01
  9.44752383e-02  1.14620383e+00 -1.21091606e+00  6.73392286e-01
 -6.10383730e-01  7.85558909e-01  4.59103149e-01 -3.95696255e-03
 -1.47218737e-03  1.59886868e+00 -6.48001055e-01  6.73008307e-01
  4.88791191e-01 -1.46805067e-02  6.33716836e-01 -5.88308284e-01
  8.03970846e-01  4.73084679e-01 -3.36586186e-03  1.30746503e-02
  1.59732109e+00 -6.53392187e-01  6.65539627e-01  5.04680750e-01
 -3.08159505e-02  6.06397577e-01 -5.39786244e-01  7.33424145e-01
  7.10368639e-01  1.50133877e-03  2.06282627e-01  1.51618957e+00
 -5.42973419e-01  5.54854345e-01  5.66410997e-01 -2.35567697e-01
  6.34234746e-01 -1.47316800e-01  2.45109308e-01  1.54615359e+00
  2.16837400e-01  1.36367199e+00 -9.72950280e-01  1.60254100e-01
  1.09798087e+00 -1.13430620e+00  5.97682913e-01 -2.32925975e-02
  1.43171122e-01  1.56667642e+00 -4.82389962e-01  7.25580392e-01
  2.35271354e-01  1.31758362e-01  1.17345436e+00 -1.20252393e+00
  5.63139926e-01 -1.44083308e-01  2.02958415e-01  1.56009721e+00
  1.65995872e-01  1.34490506e+00 -1.13260740e+00  2.57115719e-01
  7.98888908e-01 -8.23203414e-01  8.48288667e-01 -3.06950514e-02
  2.63628656e-01  1.50655243e+00 -2.95476127e-01  7.37442540e-01
 -1.36268942e-01  2.73996925e-01  1.53584606e+00  2.05109706e-01
  1.32888802e+00 -1.05024828e+00  1.79737321e-01  1.01664343e+00
 -1.06183779e+00  6.73270046e-01 -4.65435491e-02  2.07267070e-01
  1.54828702e+00 -2.89572161e-01  8.52015694e-01 -3.23212807e-01
  3.27200369e-01  1.40842319e+00  5.35609852e-01  1.01886923e+00
  1.51190871e-01  2.86134583e-01  1.21910927e+00 -9.20740121e-01
  7.37359459e-02  1.15440717e+00 -1.22482559e+00  6.88765275e-01
 -7.23886035e-01  1.02920598e+00 -5.52235849e-01  4.36105999e-03
  7.40469043e-01 -7.22115223e-01  8.87712899e-01 -7.89419460e-02
  4.53944231e-02 -3.37168297e-01 -5.25541553e-02  1.29573518e+00
  6.11468761e-01  1.25033786e+00  4.05757249e-01  7.43695485e-01
 -5.87173395e-01  5.38280884e-01  6.42529619e-01 -2.98990687e-01
  4.88014940e-01  1.32995369e-01 -6.63281688e-02  1.53253986e+00
 -1.30371325e+00  4.89499983e-01 -2.48279079e-01  2.61988548e-01
  1.49318114e+00  4.83454968e-01  1.39291450e+00  5.70224892e-01
  1.23964933e+00  4.45440939e-01  5.52547561e-01  3.01934062e-01]: 0.6 != 0.5999999999999999
======================================================================
FAIL: test_windowing (numba.tests.test_np_functions.TestNPFunctions.test_windowing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/andre/workspace/numba/numba/tests/test_np_functions.py", line 4739, in test_windowing
    check_window(np_blackman)
  File "/home/andre/workspace/numba/numba/tests/test_np_functions.py", line 4731, in check_window
    self.assertPreciseEqual(expected, got, prec='double')
  File "/home/andre/workspace/numba/numba/tests/support.py", line 431, in assertPreciseEqual
    self.fail("when comparing %s and %s: %s" % (first, second, failure_msg))
AssertionError: when comparing [8.32667268e-17 3.40000000e-01 1.00000000e+00 3.40000000e-01
 8.32667268e-17] and [-1.38777878e-17  3.40000000e-01  1.00000000e+00  3.40000000e-01
 -1.38777878e-17]: 8.326672684688674e-17 != -1.3877787807814457e-17 within 1.0785207688568521e-32 delta (9.71445146547012e-17 difference)
======================================================================
FAIL: test_basic_offload (numba.tests.test_target_extension.TestTargetOffload.test_basic_offload)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/andre/workspace/numba/numba/tests/test_target_extension.py", line 775, in test_basic_offload
    self.assertPreciseEqual(foo(5), np.sin(5))
  File "/home/andre/workspace/numba/numba/tests/support.py", line 431, in assertPreciseEqual
    self.fail("when comparing %s and %s: %s" % (first, second, failure_msg))
AssertionError: when comparing -0.9589242746631385 and -0.9589242746631387: -0.9589242746631385 != -0.9589242746631387

I've omitted a number of parallel/parfors tests that I think are due to my environment.

@apmasell
Copy link
Contributor

apmasell commented Jun 9, 2023

Running python runtests.py -m 11 without the NUMPY_EXPERIMENTAL_DTYPE_API environment variables yields:

RuntimeError: The new DType API is currently in an exploratory phase and should NOT be used for production code.  Expect modifications and crashes!  To experiment with the new API you must set `NUMPY_EXPERIMENTAL_DTYPE_API=1` as an environment variable.
Traceback (most recent call last):
  File "/home/andre/workspace/numba/numba/testing/__init__.py", line 29, in load_testsuite
    suite.addTests(loader.loadTestsFromName(f))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/miniconda3/envs/numpy1.25/lib/python3.11/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andre/workspace/numba/numba/tests/npyufunc/test_gufunc.py", line 5, in <module>
    import numpy.core.umath_tests as ut
  File "/home/andre/miniconda3/envs/numpy1.25/lib/python3.11/site-packages/numpy/core/umath_tests.py", line 13, in <module>
    from ._umath_tests import *
RuntimeError: cannot load _umath_tests module.

@apmasell
Copy link
Contributor

These bugs are fixed in #9011

@esc esc added this to the Numba 0.58 RC milestone Jun 27, 2023
@esc
Copy link
Member

esc commented Jun 27, 2023

This work (the PR at #9011) is now scheduled for inclusion in 0.58.

@esc
Copy link
Member

esc commented Aug 1, 2023

#9105 was merged and this can now be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants