Skip to content

sympy.Array support #11

Open
Open

Description

@lmriccardo

It would be possible to add support for sympy.Array objects? It might be useful in case like:

from sympy import Array
from sympy.abc import x
from sympy2jax import SymbolicModule

a = Array([1,2,3])
e = a * x
j = SymbolicModule(e)
j(x=2)

# Output --> jax.DeviceArray([2, 4, 6], dtype=int64)

Obviously, when there is no the possibility to give an array directly as "subs" to the SymbolicModule.

Thanks you for the answer!

Activity

  1. patrick-kidger commented on Aug 2, 2023

    @patrick-kidger
    Owner

    I'd be happy to take PR (with tests) on this!

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions