Skip to content

Warnings with new array dispatch functionality in casadi 3.8.0 #91

Description

@ixjlyons

Tests are emitting warnings from seemingly several places:

tests/test_trajectory_analysis.py: 4 warnings
  /Users/krlyons/proj/condor/condor/.venv/lib/python3.13/site-packages/casadi/casadi.py:913: FutureWarning:
  casadi: a numpy function was called on a casadi value (issue #2959).
  This used legacy casadi 3.7.2 behaviour, where the result type follows
  the input:
    - a numeric input (DM)       -> a plain numpy array
    - a symbolic input (SX / MX) -> a casadi value, or an error if the
                                    function has no casadi equivalent

  For a shape-correct, type-preserving result, opt in to the
  casadi-aware numpy support:

      try:
          ca.GlobalOptions.setNumpyMode(1)
      except AttributeError:
          pass

  Or use setNumpyMode(-1) to keep legacy behaviour silently.
  Shown once; run python with -W always to see every occurrence.

    _w.warn(_NUMPY_LEGACY_NOTICE, FutureWarning)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions