Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAX operations are for ArrayLike objects but we are passing Numeric typed objects #50

Closed
Qazalbash opened this issue Jan 12, 2024 · 0 comments · Fixed by #51
Closed
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Qazalbash
Copy link
Owner

Qazalbash commented Jan 12, 2024

Description

Numeric and ArrayLike are union types defined as,

Numeric = Union[Array, np.ndarray, np.bool_, np.number, bool, int, float]
Union[
  Array,  # JAX array type
  np.ndarray,  # NumPy array type
  np.bool_, np.number,  # NumPy scalar types
  bool, int, float, complex,  # Python scalar types
]

Numeric is only short of complex, other than that everything is the same. We have to come up with a method to allow Numeric typed objects for JAX operation.

/media/gradf/Academic/project/jaxampler/jaxampler/_rvs/pareto.py:62:68 - error: Operator "-" not supported for type "Numeric" when expected type is "ArrayLike" (reportGeneralTypeIssues)

What jaxampler version are you using?

nightly

Which accelerator(s) are you using?

CPU

Additional system info?

Linux

NVIDIA GPU info

No response

@Qazalbash Qazalbash added the bug Something isn't working label Jan 12, 2024
@Qazalbash Qazalbash self-assigned this Jan 12, 2024
@Qazalbash Qazalbash changed the title JAX operations are not overloaded for Numeric typed objects JAX operations are for ArrayLike objects but we are passing Numeric typed objects Jan 12, 2024
@Qazalbash Qazalbash added the help wanted Extra attention is needed label Jan 12, 2024
Qazalbash added a commit that referenced this issue Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant