You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently noticed an inconvenient issue with the atvalue function, namely that it does not work for negatively iterated ranges/units. Here's an example:
using AxisArrays
using Unitful: mm
AA =AxisArray(reshape(1:11^2, (11, 11)),
Axis{:x}(-5mm:1mm:5mm), # positiveAxis{:y}(5mm:-1mm:-5mm)) # negative# positive directionprintln(AA[x =atvalue(1mm)])
# negative directionprintln(AA[y =atvalue(1mm)])
While the instantiation of the AxisArray and the first example in the positive direction (x-axis) work perfectly fine, the latter in the negative direction (y-axis) fails and prints the following error message:
I wonder if there is a simple solution to that problem (am I doing something wrong?) or if this undesired behavior needs to be fixed inside of the package.
Kindly,
EminentCoder
PS: Unitful does not contribute to the error, the problem remains without the units as well.
The text was updated successfully, but these errors were encountered:
Dear all,
I recently noticed an inconvenient issue with the
atvalue
function, namely that it does not work for negatively iterated ranges/units. Here's an example:While the instantiation of the
AxisArray
and the first example in the positive direction (x-axis) work perfectly fine, the latter in the negative direction (y-axis) fails and prints the following error message:I wonder if there is a simple solution to that problem (am I doing something wrong?) or if this undesired behavior needs to be fixed inside of the package.
Kindly,
EminentCoder
PS: Unitful does not contribute to the error, the problem remains without the units as well.
The text was updated successfully, but these errors were encountered: