This is relevant to substituting xarray for certain multi-dimensional array operations instead of using numpy arrays with for-loops. Apparently dot product behavior of xarray is different from that of numpy.
detArrInv.dot(signalsy0), where signalsy0 is a 1D numpy array, returns a different result depending on if detArrInv is a 2D numpy.ndarray or a xarray.DataArray.
However, np.dot(detArrInv, signalsy0) returns the same result.
I found this while transitioning to xarray, it caused a lot of headache. Will look into this further, but on first pass of the documentation I can't find any indication that there should be a difference when dotting 1D arrays.
This is relevant to substituting xarray for certain multi-dimensional array operations instead of using numpy arrays with for-loops. Apparently dot product behavior of xarray is different from that of numpy.
detArrInv.dot(signalsy0)
, wheresignalsy0
is a 1D numpy array, returns a different result depending on ifdetArrInv
is a 2Dnumpy.ndarray
or axarray.DataArray
. However,np.dot(detArrInv, signalsy0)
returns the same result. I found this while transitioning to xarray, it caused a lot of headache. Will look into this further, but on first pass of the documentation I can't find any indication that there should be a difference when dotting 1D arrays.