Numpy rank is deprecated
Issue #49
resolved
With numpy >= 1.9.0, rank
is deprecated in favor of ndim
or linalg.matrix_rank
, depending on the meaning of "rank" (here is probably the source of the deprecation).
In our case we mean ndim
(please double-check!).
--- a/ffc/tensor/monomialintegration.py
+++ b/ffc/tensor/monomialintegration.py
@@ -208,7 +208,7 @@ def _compute_psi(v, table, num_points, integral_type):
if not index.index_type == MonomialIndex.FIXED]
# Put quadrature points first
- rank = numpy.rank(Psi)
+ rank = Psi.ndim
Psi = numpy.transpose(Psi, (rank - 1,) + tuple(range(0, rank - 1)))
# Compute internal index positions for current Psi
Comments (2)
-
-
- changed status to resolved
- Log in to comment
martinal/fix-issue-49 in next