Skip to content

Commit b353615

Browse files
committed
np -> keras.ops
1 parent c26e2e2 commit b353615

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bayesflow/utils/tensor_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def positive_diag(x: Tensor, method="default") -> Tensor:
386386
x_diag_positive = keras.ops.tril(keras.ops.triu(x_positive))
387387

388388
# zero diagonal entries
389-
x_offdiag = np.triu(x, k=1) + np.tril(x, k=-1)
389+
x_offdiag = keras.ops.triu(x, k=1) + keras.ops.tril(x, k=-1)
390390

391391
# sum to get full matrices with softplus applied only to diagonal entries
392392
x = x_diag_positive + x_offdiag

0 commit comments

Comments
 (0)