Skip to content

Commit

Permalink
Trac #32465: Refactor {Matrix,Vector}_double_dense through ..._numpy_…
Browse files Browse the repository at this point in the history
…dense, add ..._numpy_integer_dense

... in order to define matrix spaces backed by numpy arrays of various
types
https://numpy.org/doc/stable/reference/arrays.scalars.html#signed-
integer-types

For `ZZ`, this could for example provide a separate element
implementation that is never used for arithmetic, but is good enough for
creating matrices in methods such as `vertex_adjacency_matrix` (#32666)

Related earlier ticket: #7920

URL: https://trac.sagemath.org/32465
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): Travis Scrimshaw
  • Loading branch information
Release Manager committed Feb 21, 2022
2 parents 72f573e + b0a1a04 commit 5bf1f88
Show file tree
Hide file tree
Showing 12 changed files with 932 additions and 682 deletions.
16 changes: 5 additions & 11 deletions src/sage/matrix/matrix_double_dense.pxd
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
from .matrix_dense cimport Matrix_dense
cimport numpy as cnumpy
from .matrix_numpy_dense cimport Matrix_numpy_dense

cdef class Matrix_double_dense(Matrix_dense):
cdef object _numpy_dtype
# cdef cnumpy.NPY_TYPES _numpy_dtypeint
cdef int _numpy_dtypeint
cdef object _python_dtype
cdef object _sage_dtype
cdef object _sage_vector_dtype
cdef Matrix_double_dense _new(self, int nrows=*, int ncols=*)
cdef cnumpy.ndarray _matrix_numpy

cdef class Matrix_double_dense(Matrix_numpy_dense):

pass
Loading

0 comments on commit 5bf1f88

Please sign in to comment.