cog-imperial / entmoot

Multiobjective black-box optimization using gradient-boosted trees
https://entmoot.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
56 stars 12 forks source link

Type checking of input data #40

Open TobyBoyne opened 4 months ago

TobyBoyne commented 4 months ago

Input data, X, is either a list object or an ndarray object. We should ensure that the handling of these objects is consistent and predictable. For example, the type hint below: encode expects a list, but we type hint this as an ndarray.

https://github.com/cog-imperial/entmoot/blob/1ae5042b83188101535f9e5c2c9047d210bc05a1/entmoot/models/enting.py#L80-L85

TobyBoyne commented 4 months ago

Similarly, the encode/decode methods return an empty list if the data is empty, otherwise an ndarray