This provably happens to the delta_index parameter in our NLOPT CRS2 minimisation test, as I found through checking its value's type in the compute_function of the flux.barr_simple service.
Initially, when the two pipelines' outputs are generated, the type is still the native <class 'float'>. Once the minimisation starts, the type becomes and remains the numpy scalar type <class 'numpy.float64'>, no matter whether PISA is running in FP64 or FP32 mode. The type of the other, fixed, parameters of the service is not modified.
Now an additional problem is that this service also uses numba to define a numpy ufunc with a particular signature, which depends on PISA's global FP mode. The value of delta_index is one of the expected function inputs.
Using my installation of the current master (python 3.10.16, numba 0.60.0, numpy 1.22.4), in FP32 mode no TypeError is raised, even though the actual data type is np.float64 while the signature specifies "f4".
When I switch to my installation of the branch update/pint_numpy_scipy (with python 3.12.12, numba 0.63.1, numpy 2.3.5), the same data type modification and inconsistency happens, but in FP32 mode a TypeError: ufunc 'apply_sys_vectorized' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe'' appears. FP64 mode still works fine.
Thus, in order to be able to update dependencies, this issue seemingly also has to be fixed.
This provably happens to the
delta_indexparameter in our NLOPT CRS2 minimisation test, as I found through checking its value's type in thecompute_functionof theflux.barr_simpleservice.Initially, when the two pipelines' outputs are generated, the type is still the native
<class 'float'>. Once the minimisation starts, the type becomes and remains the numpy scalar type<class 'numpy.float64'>, no matter whether PISA is running in FP64 or FP32 mode. The type of the other, fixed, parameters of the service is not modified.Now an additional problem is that this service also uses numba to define a numpy ufunc with a particular signature, which depends on PISA's global FP mode. The value of
delta_indexis one of the expected function inputs.Using my installation of the current master (python 3.10.16, numba 0.60.0, numpy 1.22.4), in FP32 mode no
TypeErroris raised, even though the actual data type isnp.float64while the signature specifies"f4".When I switch to my installation of the branch update/pint_numpy_scipy (with python 3.12.12, numba 0.63.1, numpy 2.3.5), the same data type modification and inconsistency happens, but in FP32 mode a
TypeError: ufunc 'apply_sys_vectorized' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''appears. FP64 mode still works fine.Thus, in order to be able to update dependencies, this issue seemingly also has to be fixed.