We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/thouska/spotpy/blame/7e5e3f4f268e45e150ba8407dd6747c2f85c4cc0/src/spotpy/algorithms/_algorithm.py#L87
When I use a new loss function which return a numpy array, I found self.compare was ignored in this part:
def __call__(self, objectivefunction, params, block_print=False): self.rep += 1 if type(objectivefunction) == type([]): # TODO: change to iterable self.compare(objectivefunction[0], params) elif type(objectivefunction) == type(np.array([])): pass else: self.compare(objectivefunction, params)
Then in the console the following words will be printed:
"1 of 100, minimal objective function=1e+308, time remaining: 02:01:04"
So I am wondering why numpy array is not allowed?
I am looking forward your reply. Thanks!
The text was updated successfully, but these errors were encountered:
modify self-made loss func to avoid this issue: thouska/spotpy#319
262ec8e
No branches or pull requests
https://github.com/thouska/spotpy/blame/7e5e3f4f268e45e150ba8407dd6747c2f85c4cc0/src/spotpy/algorithms/_algorithm.py#L87
When I use a new loss function which return a numpy array, I found self.compare was ignored in this part:
def __call__(self, objectivefunction, params, block_print=False): self.rep += 1 if type(objectivefunction) == type([]): # TODO: change to iterable self.compare(objectivefunction[0], params) elif type(objectivefunction) == type(np.array([])): pass else: self.compare(objectivefunction, params)
Then in the console the following words will be printed:
"1 of 100, minimal objective function=1e+308, time remaining: 02:01:04"
So I am wondering why numpy array is not allowed?
I am looking forward your reply. Thanks!
The text was updated successfully, but these errors were encountered: