[SciPy-User] check_format in sparse matrix creation

Pauli Virtanen pav at iki.fi
Thu Jul 21 15:07:27 EDT 2011


On Thu, 21 Jul 2011 17:24:25 +0200, Gabriel Dulac-Arnold wrote:
> Is there a good reason that check_format cannot be disabled when
> creating sparse arrays in scipy.sparse?  If the correct ndarrays are
> provided in the constructor, a lot of what check_format does (pruning,
> typecasting to native byteorder) is not necessary, and wastes a lot of
> time in situations where sparse arrays are being generated in large
> numbers.  Has this been considered / was there a good reason not to
> allow disabling it?

Probably this did not occur to the author of scipy.sparse.

I don't see a problem in adding a new "unsafe" constructor to the classes,
or a flag to the constructor.

-- 
Pauli Virtanen




More information about the SciPy-User mailing list