feos-org / feos

FeOs - A Framework for Equations of State and Classical Density Functional Theory
Other
115 stars 22 forks source link

`DataSet` with no datapoints crash #58

Closed g-bauer closed 1 year ago

g-bauer commented 1 year ago

Currently, the unit of the predicted property is "inferred" by taking the unit of the 0'th element of the target vector. This panics if the vector is empty. See here.

In predict, instead of allocating an array and iterating over the index, we can use iter().map().collect().