Skip to content

Conversation

@tanodev0
Copy link

@tanodev0 tanodev0 commented Nov 9, 2025

Refactor imports and add comments for clarity. Update function docstrings to improve documentation.

Refactor imports and add comments for clarity. Update function docstrings to improve documentation.
…clip, zeros, concat, if_else, sum)

Aligns clip argument order with NumPy (amin, amax).

zeros() now returns literal zero matrices (casadi.MX.zeros) instead of empty symbols.

concat() uses any() instead of np.any() to avoid unnecessary list creation.

Reimplemented if_else() iteratively to prevent deep recursion.

sum() includes fallback for CasADi builds without axis argument support.

vector_norm() now raises a clear error for unsupported orders.

Added __all__ for faster imports and cleaner namespace.
Improve CasADi operators.py utility performance and API consistency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant