-
Notifications
You must be signed in to change notification settings - Fork 163
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
Attempting multiplication of list and float. #16
Comments
The simple solution is to just remove the .tolist() method from data['X'] and data['y]
|
Thanks for pointing out this! Your solution is correct. |
No problem! Thanks for putting this together; I've found it quite helpful. |
For the sake of model storage, I still prefer to store data['X'] and data['y'] as lists, so that the hill model can be saved as json using save_json(). I modified evaluate_hill_model(), converting them to arrays. |
In the function below we save hill_model['data']['y'] as a list of floats.
However later on we try to multiply hill_model['data']['y'] by a float. Since it is a list it can't legally be multiplied by a float, and multiplication by an integer just increases the size of the list.
To be able to preform the multiplication hill_model['data']['y'] * hill_model['sc']['y'] then hill_model['data']['y'] needs to be a numpy array, not a list.
The text was updated successfully, but these errors were encountered: