Skip to content

Commit 89f793b

Browse files
committed
Propagate type and fix typo in docstring
1 parent 6b0ee97 commit 89f793b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

s2fft/sampling/reindex.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@partial(jit, static_argnums=(1))
99
def flm_1d_to_2d_fast(flm_1d: jnp.ndarray, L: int) -> jnp.ndarray:
1010
r"""
11-
Convert from 1D indexed harmnonic coefficients to 2D indexed coefficients (JAX).
11+
Convert from 1D indexed harmonic coefficients to 2D indexed coefficients (JAX).
1212
1313
Note:
1414
Storage conventions for harmonic coefficients :math:`flm_{(\ell,m)}`, for
@@ -36,7 +36,7 @@ def flm_1d_to_2d_fast(flm_1d: jnp.ndarray, L: int) -> jnp.ndarray:
3636
jnp.ndarray: 2D indexed harmonic coefficients.
3737
3838
"""
39-
flm_2d = jnp.zeros((L, 2 * L - 1), dtype=jnp.complex128)
39+
flm_2d = jnp.zeros((L, 2 * L - 1), dtype=flm_1d.dtype)
4040
row_indices, col_indices = np.arange(L)[:, None], np.arange(2 * L - 1)[None, :]
4141
el_indices, m_indices = np.where(
4242
(row_indices <= col_indices)[::-1, :] & (row_indices <= col_indices)[::-1, ::-1]

0 commit comments

Comments
 (0)