Skip to content

segmentation fault with dot product of sparse matrices (Trac #1983) #2576

Closed
@numpy-gitbot

Description

@numpy-gitbot

Original ticket http://projects.scipy.org/numpy/ticket/1983 on 2011-11-18 by trac user fp4code, assigned to unknown.

The dot product of two sparse matrices crashes python.
The defect has appeared with

commit 867cabefe92b127b765580432b4c05d92342e275
Author: Mark Wiebe <mwiebe@enthought.com>
Date:   Fri Jul 22 10:24:14 2011 -0500

Here an example:

######################################
import sys, numpy, scipy, scipy.sparse
md = numpy.matrix(numpy.zeros((2,2))); md[0,1]=-1; md[1,0]=1
ms = scipy.sparse.lil_matrix(md)
print(sys.version)           # 2.7.2 [GCC 4.5.2]
print(numpy.version.version) # 2.0.0.dev-867cabe to 7297785
print(scipy.version.version) # 0.11.0.dev-badad3f or earlier
print(md*md)                 # OK
print(numpy.dot(md,md))      # OK
print(ms*ms)                 # OK
print(numpy.dot(ms,ms))      # Segmentation fault #
###################################################

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions