Add zeros_like and ones_like methods to ArrayLikeFactory subclasses #121
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several improvements and additions to the
CasadiLike
,JaxLike
,NumpyLike
, andTorchLike
classes and their respective tests. This PR adds new methods for creating zero and one matrices and updates the corresponding tests.Key changes:
Enhancements to
CasadiLike
,JaxLike
,NumpyLike
, andTorchLike
classes:zeros_like
andones_like
static methods to create zero and one matrices based on the input matrix type. (src/adam/casadi/casadi_like.py
,src/adam/jax/jax_like.py
,src/adam/numpy/numpy_like.py
,src/adam/pytorch/torch_like.py
) [1] [2] [3] [4]Updates to
SpatialMath
class:zeros_like
andones_like
abstract methods to theArrayLikeFactory
abstract class. (src/adam/core/spatial_math.py
)Test additions:
zeros_like
andones_like
methods, as well as ellipsis handling inCasadiLike
,JaxLike
,NumpyLike
, andTorchLike
classes. (tests/test_casadi.py
,tests/test_jax.py
,tests/test_numpy.py
,tests/test_pytorch.py
) [1] [2] [3] [4]📚 Documentation preview 📚: https://adam-docs--121.org.readthedocs.build/en/121/