mirror of
https://github.com/DifferentiableUniverseInitiative/JaxPM.git
synced 2025-06-29 16:41:11 +00:00
Replace np.power 0.5 by np.sqrt (#43)
* Switch **2 by np.sqrt * format --------- Co-authored-by: Francois Lanusse <fr.eiffel@gmail.com>
This commit is contained in:
parent
6693e5c725
commit
7d76573701
4 changed files with 6 additions and 5 deletions
|
@ -139,7 +139,7 @@ def linear_field(mesh_shape, box_size, pk, seed, sharding=None):
|
|||
pkmesh = pk(kmesh) * (mesh_shape[0] * mesh_shape[1] * mesh_shape[2]) / (
|
||||
box_size[0] * box_size[1] * box_size[2])
|
||||
|
||||
field = field * (pkmesh)**0.5
|
||||
field = field * jnp.sqrt(pkmesh)
|
||||
field = ifft3d(field)
|
||||
return field
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue