我一直在使用缩放器变量来缩放作为数组的设计变量。但是,我想以不同于其他元素的方式缩放其中一个元素。但是当我将一个数组输入到 scaler 变量中时,我收到以下错误:
File "/usr/local/lib/python2.7/site-packages/openmdao/core/problem.py", line 1642, in _calc_gradient_ln_solver
Traceback (most recent call last):
J[item][param][:, i] *= in_scale[param]
ValueError: non-broadcastable output operand with shape (1,) doesn't match the broadcast shape (48,)
是否可以将数组添加到缩放器?还是有更好的方法来单独缩放数组的各个元素而不是手动进行?