Skip to content

Commit

Permalink
Replace deprecated row_stack usage with vstack
Browse files Browse the repository at this point in the history
  • Loading branch information
djhoese committed Apr 15, 2024
1 parent 703fa7c commit 3c656d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions geotiepoints/multilinear.py
Expand Up @@ -13,7 +13,7 @@ def mlinspace(smin, smax, orders):
else:
meshes = np.meshgrid(
*[np.linspace(smin[i], smax[i], orders[i]) for i in range(len(orders))], indexing='ij')
return np.row_stack([l.flatten() for l in meshes])
return np.vstack([l.flatten() for l in meshes])

Check notice on line 16 in geotiepoints/multilinear.py

View check run for this annotation

codefactor.io / CodeFactor

geotiepoints/multilinear.py#L16

ambiguous variable name 'l' (E741)


class MultilinearInterpolator:
Expand Down Expand Up @@ -44,8 +44,8 @@ class MultilinearInterpolator:
smax = [1,1]
orders = [5,5]
f = lambda x: np.row_stack([np.sqrt( x[0,:]**2 + x[1,:]**2 ),
np.power( x[0,:]**3 + x[1,:]**3, 1.0/3.0 )])
f = lambda x: np.vstack([np.sqrt( x[0,:]**2 + x[1,:]**2 ),
np.power( x[0,:]**3 + x[1,:]**3, 1.0/3.0 )])
interp = MultilinearInterpolator(smin,smax,orders)
interp.set_values( f(interp.grid) )
Expand Down
2 changes: 1 addition & 1 deletion geotiepoints/tests/test_multilinear.py
Expand Up @@ -70,7 +70,7 @@ def test_multilinear_interp(self):
smax = [1, 1]
orders = [5, 5]

f = lambda x: np.row_stack([
f = lambda x: np.vstack([
np.sqrt(x[0, :]**2 + x[1, :]**2),
np.power(x[0, :]**3 + x[1, :]**3, 1.0 / 3.0)
])
Expand Down

0 comments on commit 3c656d9

Please sign in to comment.