csu-hmc / opty

A library for using direct collocation in the optimization of dynamic systems.
http://opty.readthedocs.io
Other
92 stars 20 forks source link

Numpy casting deprecation #117

Closed moorepants closed 2 months ago

moorepants commented 7 months ago
opty/tests/test_direct_collocation.py::TestConstraintCollocator::test_gen_multi_arg_con_func_midpoint
  /home/moorepants/src/opty/opty/tests/test_direct_collocation.py:239: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    expected_dynamic[i] = (m * (vn - vi) / h + c * (vn + vi) / 2 + k