numpy incompatibility

#9
by gordonnoah - opened

Anyone know the last compatible numpy version. Im experiencing some issues that appear to be a known issue with other users as well. I cant find any requirements file in the source code and the repo is no longer maintained. I suspect downgrading to latest compatible np will be a workaround

The code im running is snippet provided by hf and in the lib docs

import fasttext
from huggingface_hub import hf_hub_download, snapshot_download

model_path = hf_hub_download(repo_id="facebook/fasttext-language-identification", filename="model.bin")
model = fasttext.load_model(model_path)
model.predict("Hello, world!")

PARTIAL TRACE:

.py", line 239, in predict
    return labels, np.array(probs, copy=False)
ValueError: Unable to avoid copy while creating an array as requested.
If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` to allow a copy when needed (no behavior change in NumPy 1.x).
For more details, see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword.

Sign up or log in to comment