octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #63281] bsxfun fails to preserve sparse output


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #63281] bsxfun fails to preserve sparse output for some functions
Date: Thu, 27 Oct 2022 14:50:27 -0400 (EDT)

Follow-up Comment #8, bug #63281 (project octave):

plus:

A = sprand (10, 10, 0.1);
x = 1;
Ax=issparse(A + x)
sx = sparse (x);
Asx=issparse(A + sx)
r = 1:10;
Ar=issparse(A + r)
sr = sparse (r);
Asr=issparse(A + sr)
Ax =
  logical
   0
Asx =
  logical
   1
Ar =
  logical
   0
Asr =
  logical
   1


minus:

A = sprand (10, 10, 0.1);
x = 1;
Ax=issparse(A - x)
sx = sparse (x);
Asx=issparse(A - sx)
r = 1:10;
Ar=issparse(A - r)
sr = sparse (r);
Asr=issparse(A - sr)
Ax =
  logical
   0
Asx =
  logical
   1
Ar =
  logical
   0
Asr =
  logical
   1


times:

A = sprand (10, 10, 0.1);
x = 1;
Ax=issparse(A .* x)
sx = sparse (x);
Asx=issparse(A .* sx)
r = 1:10;
Ar=issparse(A .* r)
sr = sparse (r);
Asr=issparse(A .* sr)
Ax =
  logical
   1
Asx =
  logical
   1
Ar =
  logical
   1
Asr =
  logical
   1



divide:

A = sprand (10, 10, 0.1);
x = 1;
Ax=issparse(A ./ x)
sx = sparse (x);
Asx=issparse(A ./ sx)
r = 1:10;
Ar=issparse(A ./ r)
sr = sparse (r);
Asr=issparse(A ./ sr)
Ax =
  logical
   1
Asx =
  logical
   1
Ar =
  logical
   1
Asr =
  logical
   1


and:

A = sprand (10, 10, 0.1);
x = 1;
Ax=issparse(and(A,x))
sx = sparse (x);
Asx=issparse(and(A,sx))
r = 1:10;
Ar=issparse(and(A,r))
sr = sparse (r);
Asr=issparse(and(A,sr))
Ax =
  logical
   1
Asx =
  logical
   1
Ar =
  logical
   1
Asr =
  logical
   1



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63281>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]