Version Confirmation
Bug Description
Creating an object of the class Piece in flixOpt by using attributes of the type numpy.float64 throws an error. Converting it to the type float before solves the issue.
Minimal Reproducible Example
# in the Complex example.py 5 was changed with np.float64(5) to get the unsupported type
piecewise_conversion = fx.PiecewiseConversion(
{
P_el.label: fx.Piecewise([fx.Piece(np.float64(5), 30), fx.Piece(40, 60)]),
Q_th.label: fx.Piecewise([fx.Piece(6, 35), fx.Piece(45, 100)]),
Q_fu.label: fx.Piecewise([fx.Piece(12, 70), fx.Piece(90, 200)]),
}
)
Error Output
flixopt.core.ConversionError: Converting data <class 'numpy.float64'> to xarray.Dataset raised an error: coords is not dict-like, but it has 1 items, which does not match the 0 dimensions of the data
Version Confirmation
Bug Description
Creating an object of the class Piece in flixOpt by using attributes of the type numpy.float64 throws an error. Converting it to the type float before solves the issue.
Minimal Reproducible Example
Error Output