MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: sparsearray and its nonempty cells


On 1/13/07 at 5:02 AM, Arkadiusz.Majka at gmail.com wrote:

>Of course I can simply use Sort  but I would prefer to obtain
>already sorted list directly from

>Mysparse/. SparseArray[_, _, _, x_] :> x[[2, 2]]

>or from ArrayRules[...].

>BTW Most[First/@ArrayRules[Mysparse]] does not produce sorted list

That isn't consistent with the results I get here, i.e.,

In[5]:=
Mysparse=SparseArray[i_/;2â?¤iâ?¤11\[RuleDelayed]0.8,20];
OrderedQ[Most[First/@ArrayRules[Mysparse]]]

Out[6]=
True

In[7]:=
$Version

Out[7]=
5.2 for Mac OS X (June 20, 2005)
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: On AspectRatio
  • Next by Date: Re: Sorting by date
  • Previous by thread: Re: Re: sparsearray and its nonempty cells
  • Next by thread: Re: sparsearray and its nonempty cells