Skip to content

Commit

Permalink
fix np.warnings missing for np>=1.24
Browse files Browse the repository at this point in the history
  • Loading branch information
trichter committed Feb 27, 2023
1 parent e6d3f6e commit 0f5c663
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions yam/tests/test_correlate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright 2017-2019 Tom Eulenfeld, MIT license
import unittest
import sys
import warnings

import numpy as np
from obspy import read, read_inventory, UTCDateTime as UTC
Expand Down Expand Up @@ -282,8 +283,8 @@ def test_preprocess(self):
# see https://docs.scipy.org/doc/numpy-1.13.0/release.html#
# assigning-to-slices-views-of-maskedarray
ignore_msg = r'setting an item on a masked array which has a shared'
with np.warnings.catch_warnings():
np.warnings.filterwarnings('ignore', ignore_msg)
with warnings.catch_warnings():
warnings.filterwarnings('ignore', ignore_msg)
preprocess(stream, day=day, inventory=read_inventory(),
remove_response=True,
filter=None,
Expand Down

0 comments on commit 0f5c663

Please sign in to comment.