-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
missing conditions in setup, segfault test
- Loading branch information
1 parent
2b70a15
commit 343c333
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import pytest | ||
import jax | ||
|
||
# jax.config.update("jax_platform_name", "cpu") | ||
import jax.numpy as jnp | ||
import jax._src.test_util as jtu | ||
import sphericart.jax | ||
|
||
def xyz(): | ||
key = jax.random.PRNGKey(0) | ||
return 6 * jax.random.normal(key, (100, 3)) | ||
|
||
|
||
def compute(xyz): | ||
sph = sphericart.jax.spherical_harmonics(l_max=4, normalized=False, xyz=xyz) | ||
assert jnp.linalg.norm(sph) != 0.0 | ||
return sph.sum() | ||
|
||
|
||
sph = compute(xyz()) | ||
|
||
print (sph) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters