Why a numpy array objectivefunction value is not compared when calling self.status in _algorithm/postprocessing.py module
OuyangWenyu opened this issue · 0 comments
OuyangWenyu commented
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!