Open Thunderabc opened 4 months ago
Hi,
Can you please provide more context on which line of code resulting in this bug ?
It is likely due to the different numpy version. Can you downgrade your numpy to be earlier version, such as numpy = 1.10.0
Thank you!More details about this bug:~\AppData\Local\Temp\ipykernel_10888\454163803.py in
~\Desktop\BOIL-master\bayes_opt\sequentialBO\boil.py in init(self, n_init_points, seed) 174 175 # Evaluate target function at all initialization --> 176 y_init_curves, y_init_cost=self.f(init_X) 177 178 y_init_cost=np.atleast_2d(np.asarray(y_init_cost))#.astype('Float64')
~\Desktop\BOIL-master\bayes_opt\test_functions\drl_experiments.py in func(self, X) 55 elapse = [output[1]] 56 else: ---> 57 output = np.apply_along_axis(self.evaluate, 1, X) 58 Reward = output[:, 0].tolist() 59 elapse = output[:, 1].tolist()
<__array_function__ internals> in apply_along_axis(*args, **kwargs) D:\ANACONDA\envs\gpbss2\lib\site-packages\numpy\lib\shape_base.py in apply_along_axis(func1d, axis, arr, *args, **kwargs) 377 'Cannot apply_along_axis when any iteration dimensions are 0' 378 ) from None --> 379 res = asanyarray(func1d(inarr_view[ind0], *args, **kwargs)) 380 381 # build a buffer for storing evaluations of func1d. ~\Desktop\BOIL-master\bayes_opt\test_functions\drl_experiments.py in evaluate(self, X, unwrap, display) 107 108 for e in range(N): --> 109 totalrewards[e], t = ag.nextEpisode(env, t, display=display) 110 end_time = time.time() 111 elapse = end_time-start_time ~\Desktop\BOIL-master\bayes_opt\test_functions\drl\agents.py in nextEpisode(self, env, time, display) 84 for t in range(time, time + self.params["maxSteps"]): 85 action = self.act(observation, t) ---> 86 prev_obs = observation 87 if time_mod.time() - last_step < 0.01: # to avoid Mujoco error 88 time_mod.sleep(0.01) ~\Desktop\BOIL-master\bayes_opt\test_functions\drl\agents.py in act(self, state, time) 59 def act(self, state, time): 60 action = self._act(self.norm_state(np.atleast_2d(state)), time) ---> 61 return self.denorm_act(action) 62 63 def _act(self, state, time): ~\Desktop\BOIL-master\bayes_opt\test_functions\drl\agents.py in
Good afternoon! When I'm working with this package, I'm getting an array mismatch error that seems to be due to a discrepancy between variables and their settings. How should I resolve this?