[SciPy-dev] sparse deletion and sparse random matrices.

Nathan Bell wnbell@gmail....
Fri Apr 18 12:49:23 CDT 2008

On Wed, Apr 16, 2008 at 1:16 PM, Viral Shah
<vshah@interactivesupercomputing.com> wrote:
>  The two things I believe could be immediately useful are some simple
>  routines for deleting rows and columns, and routines to create sparse
>  random matrices. The latter would be greatly useful for examples,
>  exploration, debugging etc.
>  The routines might look something like below. If there's interest, I
>  can help with whatever needs to be done to put them in the tree:

sprand() would be useful however deleterowcol() is too special purpose IMO.

Two comments on your sprand()
1) leads to values outside [0,1) when an (i,j) entry occured more than once.
2) fix(rand()) may be better implemented with numpy.random.random_integers()

With a docstring + unittests this would make a nice addition to

Nathan Bell wnbell@gmail.com

More information about the Scipy-dev mailing list