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

sanfis/helpers.py: AttributeError: 'numpy.ndarray' object has no attribute 'isnan' #1

Open
michaelgondosari opened this issue Aug 14, 2023 · 0 comments

Comments

@michaelgondosari
Copy link

michaelgondosari commented Aug 14, 2023

Hi, I'm looking to use this package for a predict-optimization project using ANFIS. When fitting the model as below, I got a numpy error in the sanfis/helpers.py file.

history = model.fit(train_data=[X_train, y_train], valid_data=[X_valid, y_valid], optimizer=optimizer, loss_function=loss_functions, epochs=200)

Perhaps line 263 of the helpers.py file needs to be modified from:
transformed_dataloder.dataset[1][transformed_dataloder.dataset[1].isnan()] = 0.0

into something like:
transformed_dataloader.dataset[1][np.isnan(transformed_dataloader.dataset[1])] = 0.0

as 'numpy.ndarray' object has no attribute 'isnan'.
Or can I fix this error without changing this section? Your help is very appreciated.

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

No branches or pull requests

1 participant