Skip to content

Commit 2c7b177

Browse files
committed
suppress warnings, fixup tutorials
1 parent c358e55 commit 2c7b177

File tree

5 files changed

+7
-38
lines changed

5 files changed

+7
-38
lines changed

docs/tutorials/01_DataOperations/plot_download.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@
529529
],
530530
"metadata": {
531531
"kernelspec": {
532-
"display_name": "Python 3",
532+
"display_name": ".venv",
533533
"language": "python",
534534
"name": "python3"
535535
},

docs/tutorials/basic/index.md

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

nltools/data/adjacency.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1739,7 +1739,8 @@ def estimate_srm_stats(results, var_name, tailed=1):
17391739
estimate = results[var_name].mean()
17401740
standardized = (results[var_name] / results["total_variance"]).mean()
17411741
se = results[var_name].std() / np.sqrt(len(results[var_name]))
1742-
t = estimate / se
1742+
with np.errstate(invalid="ignore", divide="ignore"):
1743+
t = estimate / se
17431744
if tailed == 1:
17441745
p = 1 - stats.t.cdf(t, len(results[var_name]) - 1)
17451746
elif tailed == 2:

nltools/stats.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,8 @@ def fisher_r_to_z(r):
480480
Clips r values to (-1, 1) range to avoid invalid arctanh inputs
481481
"""
482482
# Clip r to valid range for arctanh to avoid invalid value warnings
483-
return np.arctanh(r)
483+
with np.errstate(invalid="ignore"):
484+
return np.arctanh(r)
484485

485486

486487
def fisher_z_to_r(z):
@@ -1003,7 +1004,8 @@ def summarize_bootstrap(data, save_weights=False):
10031004
wstd = data.std()
10041005
wmean = data.mean()
10051006
wz = deepcopy(wmean)
1006-
wz.data = wmean.data / wstd.data
1007+
with np.errstate(invalid="ignore", divide="ignore"):
1008+
wz.data = wmean.data / wstd.data
10071009
wp = deepcopy(wmean)
10081010
wp.data = 2 * (1 - norm.cdf(np.abs(wz.data)))
10091011
# Create outputs

nltools/tests/test_datasets.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ def test_get_collection_image_metadata_shows_warning(self, mock_fetch_collection
147147
assert len(result) == 1
148148

149149

150-
@pytest.mark.slow
151150
class TestIntegration:
152151
"""Integration tests that require network access"""
153152

0 commit comments

Comments
 (0)