Skip to content

Commit 9b4d94d

Browse files
alexfiklinducer
authored andcommitted
fix numpy deprecations
1 parent 59e0a04 commit 9b4d94d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

pytential/qbx/fmmlib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,11 @@ def reorder_potentials(self, potentials):
238238
def add_potgrad_onto_output(self, output, output_slice, pot, grad):
239239
for i_out, out in enumerate(self.tree_indep.outputs):
240240
if len(out) == 0:
241-
output[i_out][output_slice] += pot
241+
output[i_out][output_slice] += pot.squeeze()
242242
elif len(out) == 1:
243243
axis, = out
244244
if isinstance(grad, np.ndarray):
245-
output[i_out][output_slice] += grad[axis]
245+
output[i_out][output_slice] += grad[axis].squeeze()
246246
else:
247247
assert grad == 0
248248
else:

pytential/symbolic/execution.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -925,8 +925,7 @@ def _bmat(blocks, dtypes):
925925
if not is_zero(blocks[ibrow, ibcol]))
926926
for ibcol in range(ncolumns)])
927927

928-
result = np.zeros((brs[-1], bcs[-1]),
929-
dtype=np.find_common_type(dtypes, []))
928+
result = np.zeros((brs[-1], bcs[-1]), dtype=np.result_type(*dtypes))
930929
for ibcol in range(ncolumns):
931930
for ibrow in range(nrows):
932931
result[brs[ibrow]:brs[ibrow + 1], bcs[ibcol]:bcs[ibcol + 1]] = \

0 commit comments

Comments
 (0)