MilesCranmer / PySR

High-Performance Symbolic Regression in Python and Julia
https://astroautomata.com/PySR
Apache License 2.0
2.09k stars 197 forks source link

Fix y_units bug #545

Closed MilesCranmer closed 4 months ago

MilesCranmer commented 4 months ago

Fixes #544 by @drcassar.

Basically we were converting to Julia Array type for all input y_units, rather than only list inputs.

Surprisingly this got through the unittests because m/s was used for the units in all the tests, meaning that m (first component of the vector ['m', '/', 's']) is still a valid unit!