[SciPy-dev] sparse deletion and sparse random matrices.
Nathan Bell
wnbell at gmail.com
Fri Apr 18 13:49:23 EDT 2008
On Wed, Apr 16, 2008 at 1:16 PM, Viral Shah
<vshah at 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
sparse/construct.py
--
Nathan Bell wnbell at gmail.com
http://graphics.cs.uiuc.edu/~wnbell/
More information about the SciPy-Dev
mailing list