Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numpy == 1.24.3 throws attribute error - deprecated np.float #908

Open
wario420 opened this issue May 3, 2023 · 1 comment
Open

numpy == 1.24.3 throws attribute error - deprecated np.float #908

wario420 opened this issue May 3, 2023 · 1 comment
Labels

Comments

@wario420
Copy link

wario420 commented May 3, 2023

Description
Quickstart training procedure as described in Docs throws AttributeError.

AttributeError: module 'numpy' has no attribute 'float'.
np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.
The aliases was originally deprecated in NumPy 1.20;

Reproduce
Run tranining procedure with nlu_engine.fit() on virtenv with python 3.8 and numbpy == > 1.20.

`import io
import json
from snips_nlu import SnipsNLUEngine

with io.open() as f:
sample_dataset = json.load(f)

nlu_engine = SnipsNLUEngine()

nlu_engine.fit(sample_dataset)

parsing = nlu_engine.parse("Whats the weather today in Tokyo?")
print(json.dumps(parsing, indent=2))`

Expected behavior
Output json as described in the docs quickstart.

If run with numbpy == < 1.20 output is generated as expected.

Environment:

  • OS: MacOS 12.6.3
  • python version: 3.8
  • snips-nlu version: 0.20.2
@wario420 wario420 added the bug label May 3, 2023
@nijanthan-git
Copy link

Did you tried numpy==1.23.3 version? because, this issue resolved for this version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants