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
G3 numeric types (and their vector equivalents) all seem to have some broken arithmetic operations, either with numpy and python scalars, or even with themselves. Here is a sampling of things that raise TypeError: unsupported operand...:
G3Int + G3Int
int + G3Int
G3Int + int
G3VectorInt + int
G3VectorDouble + G3VectorDouble
float * G3VectorDouble
float + G3VectorDouble
G3VectorDouble + float
G3VectorComplexDouble * float
I suspect this is not easy to resolve. You can work around the issue by using np.asarray() on G3VectorInt and G3VectorDouble objects for now, since the result is a view on the underlying shared memory buffer.
* Implement binary and unary ufuncs for G3Timestream, G3VectorComplexDouble, ComplexDoubleVector, G3VectorDouble, DoubleVector, G3VectorInt, IntVector, G3VectorBool, BoolVector to enable arithmetic operations involving these types or scalars or numpy arrays on either side of each operator.
* Implement bindings for G3TimestreamMap that mimic the behavior of SO's G3SuperTimestream objects (.times, .data, .names properties). Note that this also changes the existing `G3TimestreamMap.times()` method into a property attribute.
Fixes#83 (as much as possible)
Co-authored-by: Nicholas Huang <[email protected]>
G3 numeric types (and their vector equivalents) all seem to have some broken arithmetic operations, either with numpy and python scalars, or even with themselves. Here is a sampling of things that raise
TypeError: unsupported operand...
:Notably, the follwing do work:
The text was updated successfully, but these errors were encountered: