I agree with you on the lambda part. I am still not sure with else
part because users may not right about whether the matrix is enough
sparse and the methods(which exploits sparsity) would be inefficient
if someone enters the dense matrix actually. Maybe we should have a
common matrix interface and
Can anyone please explain me why we have the different implementations
for row and col in sparse class. Can't we just reuse these methods
from the dense class? Is there the exploitation of sparsity in these
methods?
-Saurabh
--
You received this message because you are subscribed to the Google G
> Isn't it more efficient if there are many zeros in a given row?
As I said before, there was a bug in it. They just returned the row of
zeroes or vector of zeroes every time I call them, even if there were
non-zero element in the rows and columns in question. Furthermore, as
chris pointed out in
> What if I have a billion by billion matrix with a single nonzero element?
>
> Aaron Meurer
I think you are right. In that case, I will just make the
implementation that was in an earlier commit in my current PR with
lists converted to matrices.
-Saurabh Jha
--
You received this message because
I think you can't avoid checking all the columns of the concerned row
if you want to return a particular row, because even if there is only
one non-zero element in that row, we would still have to insert all
zeroes in it.
like in [0, 0, 0, 1, ,0,0, 0, 0]
we would have to insert all these zeroes, a
I think I am getting it but just to be sure, is it intended to be a
fix that will go along with current method(based on inheritance of
methods) or a replacement.
On Jun 4, 9:05 pm, Chris Smith wrote:
> This is why it's better to work with smat -- you can load it up with the
> non-zero elements a
On Mon, Jun 3, 2013 at 7:45 PM, Saurabh Jha wrote:
> I agree with you on the lambda part. I am still not sure with else
> part because users may not right about whether the matrix is enough
> sparse and the methods(which exploits sparsity) would be inefficient
> if someone enters the dense matrix
Isn't it more efficient if there are many zeros in a given row?
Aaron Meurer
On Tue, Jun 4, 2013 at 2:01 AM, Saurabh Jha wrote:
> Can anyone please explain me why we have the different implementations
> for row and col in sparse class. Can't we just reuse these methods
> from the dense class? Is
What if I have a billion by billion matrix with a single nonzero element?
Aaron Meurer
On Tue, Jun 4, 2013 at 10:16 AM, Saurabh Jha wrote:
>> Isn't it more efficient if there are many zeros in a given row?
>
> As I said before, there was a bug in it. They just returned the row of
> zeroes or vec
Please don't go backwards. We know what to do and the fix is
straightforward, I think:
```
def submatrix(self, keys):
rlo, rhi, clo, chi = self.key2bounds(keys)
r, c = rhi - rlo, chi - clo
if r*c < len(self._smat):
# the subregion is smaller than the number
This is why it's better to work with smat -- you can load it up with the
non-zero elements and pass that to `_new`. Something like I just posted
would work, I think.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and sto
What I propose was to be used with your inheritance method. The else part
should also be changed to
```
# the number of non-zero elements is smaller than the subregion
smat = {}
for rk, ck in self._smat:
if rlo <= rk <= rhi and clo <= ck <= chi:
12 matches
Mail list logo