ndarray
ndarray copied to clipboard
Allow references to be used as scalar operands
trafficstars
Fixes #1200
Relaxes the type constraint on StaticOperand so that it may be used for references.
This example now works:
let arr1 = array!([1, 2, 3]);
let four: i32 = 4;
let arr2 = arr1 + &four; //previously errored on lack of an Add<> impl
The CI failure appears to be unrelated to the code change:
docker: Error response from daemon: Duplicate mount point: /home/runner/work/ndarray/ndarray.
Removing 'static is a breaking change. 'static implies that one can use Any and ad hoc type based "specialization", which is why we have snuck in 'static in a few places. We would like to continue to have 'static in all places where we'd like to insert explicit SIMD or BLAS etc operations.
closing for now because keeping 'static is preferred