File size: 584 Bytes
d249f08 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | """Small compatibility shims loaded before the training code.
The ScaleDF release pins augly 1.0.0, which still references NumPy's
deprecated scalar aliases. Newer NumPy versions removed them, so restore the
aliases locally without changing the machine-wide Python environment.
"""
try:
import numpy as _np
_ALIASES = {
"float": float,
"int": int,
"complex": complex,
"object": object,
}
for _name, _value in _ALIASES.items():
if _name not in _np.__dict__:
setattr(_np, _name, _value)
except Exception:
pass
|