Skip to content

Commit 5cf0abb

Browse files
committed
update the model builder calls, test against python 3.11, drop testing against python 3.8
1 parent 6bd8406 commit 5cf0abb

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: ["ubuntu-latest"]
18-
python-version: ["3.8", "3.10"]
18+
python-version: ["3.10", "3.11"]
1919
test-file: ["tests/test_dcip.py", "tests/test_em.py", "tests/test_gpr.py tests/test_seismic.py", "tests/test_inversion.py", "tests/test_gravity.py tests/test_mag.py"]
2020

2121
steps:

geoscilabs/dcip/DC_Pseudosections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _transform(self, m):
5353
sig1, sig2, sig3 = np.exp(sig1), np.exp(sig2), np.exp(sig3)
5454
sigma = np.ones(mesh.nC) * sig1
5555
sigma[mesh.gridCC[:, 1] < zh] = sig2
56-
blkind = utils.model_builder.getIndicesSphere(np.r_[x, zc], r, mesh.gridCC)
56+
blkind = utils.model_builder.get_indices_sphere(np.r_[x, zc], r, mesh.gridCC)
5757
sigma[blkind] = sig3
5858
return sigma
5959

geoscilabs/em/TDEMGroundedSource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def run_simulation(fname="tdem_gs_half.h5", sigma_block=0.01, sigma_halfspace=0.
100100
hz = [(cs, npad, -1.5), (cs, ncz), (cs, npad, 1.5)]
101101
mesh = TensorMesh([hx, hy, hz], "CCC")
102102
sigma = np.ones(mesh.nC) * sigma_halfspace
103-
blk_ind = utils.ModelBuilder.getIndicesBlock(
103+
blk_ind = utils.ModelBuilder.get_indices_block(
104104
np.r_[-40, -40, -160], np.r_[40, 40, -80], mesh.gridCC
105105
)
106106
sigma[mesh.gridCC[:, 2] > 0.0] = 1e-8

geoscilabs/inversion/TomographyInversion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def add_noise(self):
130130
def get_block_index(self, xc=50, yc=50, dx=20, dy=20):
131131
p0 = np.array([xc - dx / 2.0, yc + dy / 2])
132132
p1 = np.array([xc + dx / 2.0, yc - dy / 2])
133-
index = utils.model_builder.getIndicesBlock(p0, p1, self.mesh_prop.gridCC)
133+
index = utils.model_builder.get_indices_block(p0, p1, self.mesh_prop.gridCC)
134134
return index
135135

136136
def get_block_points(self, xc=50, yc=50, dx=20, dy=20):

0 commit comments

Comments
 (0)