Skip to content

Commit 8050d46

Browse files
committed
prune redundant code dependncies etc
1 parent efddce6 commit 8050d46

File tree

8 files changed

+7
-83
lines changed

8 files changed

+7
-83
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
# Add following in for testing
8-
# - feature/deploy_docs
9-
7+
108
jobs:
119
build:
1210

MANIFEST.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ include .pip_readme.rst
77
include README.rst
88
include pytest.ini
99
include LICENCE.txt
10-
include LICENCE_EXT.txt
1110
include s2fft/default-logging-config.yaml
12-
include tox.ini
1311

1412
exclude .coveragerc
1513
exclude *.log

s2fft/default-logging-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# =============================================================
2-
# Logging setup for S2fft Software package (2022)
2+
# Logging setup for S2fft Software package (2023)
33
# =============================================================
44

55
version: 1

s2fft/precompute_transforms/construct.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
from jax import jit, config
1+
from jax import config
22

33
config.update("jax_enable_x64", True)
44

55
import numpy as np
66
import jax.numpy as jnp
7-
from jax import jit
8-
from functools import partial
97

108
from s2fft.sampling import s2_samples as samples
119
from s2fft.utils import quadrature, quadrature_jax

s2fft/recursions/price_mcewen.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from jax import local_device_count
2-
31
import numpy as np
42
import jax.numpy as jnp
53
import jax.lax as lax
@@ -244,7 +242,7 @@ def renorm_m_loop(i, args):
244242
# Remove redundant nans:
245243
# - in forward pass these are not accessed, so are irrelevant.
246244
# - in backward pass the adjoint computation otherwise accumulates these
247-
# nans into grads if not set to zero.
245+
# nans into grads if not explicitly set to zero.
248246
lrenorm = jnp.nan_to_num(lrenorm, nan=0.0, posinf=0.0, neginf=0.0)
249247
cpi = jnp.nan_to_num(cpi, nan=0.0, posinf=0.0, neginf=0.0)
250248
cp2 = jnp.nan_to_num(cp2, nan=0.0, posinf=0.0, neginf=0.0)

s2fft/sampling/so3_samples.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import numpy as np
22
from s2fft.sampling import s2_samples as samples
33
from typing import Tuple
4-
import s2fft
54

65

76
def f_shape(

s2fft/transforms/otf_recursions.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22
import jax.numpy as jnp
33
import jax.lax as lax
4-
from jax import jit, pmap, local_device_count, custom_vjp
4+
from jax import jit, pmap, local_device_count
55
from functools import partial
66
from typing import List
77
from s2fft.sampling import s2_samples as samples
@@ -379,16 +379,7 @@ def eval_recursion_step(
379379
).reshape(ntheta, ftm.shape[-1])
380380

381381
else:
382-
(
383-
ftm,
384-
dl_entry,
385-
dl_iter,
386-
lrenorm,
387-
indices,
388-
omc,
389-
c,
390-
s,
391-
) = lax.fori_loop(
382+
(ftm, dl_entry, dl_iter, lrenorm, indices, omc, c, s,) = lax.fori_loop(
392383
2,
393384
L - 1 + i,
394385
pm_recursion_step,
@@ -818,10 +809,7 @@ def eval_recursion_step(
818809
opsdevice = int((L - L_lower) / ndevices)
819810

820811
flm = flm.at[L_lower:].set(
821-
pmap(
822-
eval_recursion_step,
823-
in_axes=(0, 1, 2, 2, 1, 1, 1, 1),
824-
)(
812+
pmap(eval_recursion_step, in_axes=(0, 1, 2, 2, 1, 1, 1, 1),)(
825813
flm[L_lower:].reshape(ndevices, opsdevice, 2 * L - 1),
826814
dl_entry.reshape(ntheta, ndevices, opsdevice),
827815
dl_iter.reshape(2, ntheta, ndevices, opsdevice),

tox.ini

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)