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

decorator not implemented #4

Open
gviejo opened this issue Feb 27, 2024 · 2 comments
Open

decorator not implemented #4

gviejo opened this issue Feb 27, 2024 · 2 comments

Comments

@gviejo
Copy link
Contributor

gviejo commented Feb 27, 2024

if decorated:
convert_to_numpy
run the function
convert back to jax

@gviejo
Copy link
Contributor Author

gviejo commented Feb 27, 2024

def decoratorcasting(func):
	
	def wrapper(array):		
		return func(np.asarray(array))

	return wrapper

@decoratorcasting
@jit(nopython=True)
def test_numba(array):
	return np.sum(array)

@gviejo
Copy link
Contributor Author

gviejo commented Feb 27, 2024

grabs the configuration

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

No branches or pull requests

1 participant