Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: sparsearray and its nonempty cells

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72659] Re: sparsearray and its nonempty cells
  • From: Bill Rowe <readnewsciv at sbcglobal.net>
  • Date: Sun, 14 Jan 2007 04:22:39 -0500 (EST)

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