[Numpy-discussion] ANN: SfePy 2017.1

2017-02-28 Thread Robert Cimrman
recipe (thanks to Daniel Wheeler) - fixes for Python 3.6 For full release notes see http://docs.sfepy.org/doc/release_notes.html#id1 (rather long and technical). Cheers, Robert Cimrman --- Contributors to this release in alphabetical order: Siwei Chen Robert Cimrman Jan Heczko Vladimir Lukes

[Numpy-discussion] ANN: SfePy 2016.4

2016-12-07 Thread Robert Cimrman
technical). Cheers, Robert Cimrman --- Contributors to this release in alphabetical order: Robert Cimrman Vladimir Lukes Matyas Novak ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] ANN: SfePy 2016.3

2016-09-30 Thread Robert Cimrman
homogenized coefficients - using argparse instead of optparse For full release notes see http://docs.sfepy.org/doc/release_notes.html#id1 (rather long and technical). Cheers, Robert Cimrman --- Contributors to this release in alphabetical order: Robert Cimrman Jan Heczko Thomas Kluyver Vladimir

[Numpy-discussion] ANN: SfePy 2016.2

2016-05-12 Thread Robert Cimrman
computation of homogenized coefficients - clean up of elastic terms - read support for msh file mesh format of gmsh For full release notes see http://docs.sfepy.org/doc/release_notes.html#id1 (rather long and technical). Best regards, Robert Cimrman on behalf of the SfePy development team --- Contributors

[Numpy-discussion] ANN: SfePy 2016.1

2016-02-24 Thread Robert Cimrman
checking of shapes of term arguments - improved mesh parametrization code and documentation - support for fieldsplit preconditioners of PETSc For full release notes see http://docs.sfepy.org/doc/release_notes.html#id1 (rather long and technical). Best regards, Robert Cimrman on behalf of the

[Numpy-discussion] ANN: SfePy 2015.4

2015-12-01 Thread Robert Cimrman
combination boundary conditions - balloon inflation example For full release notes see http://docs.sfepy.org/doc/release_notes.html#id1 (rather long and technical). Best regards, Robert Cimrman on behalf of the SfePy development team --- Contributors to this release in alphabetical order: Robert

[Numpy-discussion] ANN: SfePy 2015.3

2015-09-23 Thread Robert Cimrman
technical). Best regards, Robert Cimrman on behalf of the SfePy development team --- Contributors to this release in alphabetical order: Robert Cimrman Vladimir Lukes ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org

[Numpy-discussion] ANN: SfePy 2015.2

2015-05-29 Thread Robert Cimrman
technical). Best regards, Robert Cimrman and Contributors (*) (*) Contributors to this release (alphabetical order): Lubos Kejzlar, Vladimir Lukes, Anton Gladky, Matyas Novak ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org

[Numpy-discussion] ANN: SfePy 2015.1

2015-02-26 Thread Robert Cimrman
- redesigned handling of solver parameters - new modal analysis example For full release notes see http://docs.sfepy.org/doc/release_notes.html#id1 (rather long and technical). Best regards, Robert Cimrman and Contributors (*) (*) Contributors to this release (alphabetical order): Lubos Kejzlar, Vladimir

[Numpy-discussion] ANN: SfePy 2014.4

2014-11-28 Thread Robert Cimrman
library For full release notes see http://docs.sfepy.org/doc/release_notes.html#id1 (rather long and technical). Best regards, Robert Cimrman and Contributors (*) (*) Contributors to this release (alphabetical order): Lubos Kejzlar, Vladimir Lukes

[Numpy-discussion] ANN: SfePy 2014.3

2014-09-25 Thread Robert Cimrman
release notes see http://docs.sfepy.org/doc/release_notes.html#id1 (rather long and technical). Best regards, Robert Cimrman and Contributors (*) (*) Contributors to this release (alphabetical order): Vladimir Lukes, Matyas Novak, Zhihua Ouyang, Jaroslav Vondrejc

[Numpy-discussion] ANN: SfePy 2014.2

2014-05-23 Thread Robert Cimrman
-dependent problems with adaptive time steps - three new terms For full release notes see http://docs.sfepy.org/doc/release_notes.html#id1 (rather long and technical). Best regards, Robert Cimrman and Contributors (*) (*) Contributors to this release (alphabetical order): Vladimír Lukeš

[Numpy-discussion] ANN: SfePy 2014.1

2014-02-25 Thread Robert Cimrman
/release_notes.html#id1 (rather long and technical). Best regards, Robert Cimrman and Contributors (*) (*) Contributors to this release (alphabetical order): Vladimír Lukeš, Matyáš Novák, Jaroslav Vondřejc ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http

[Numpy-discussion] ANN: SfePy 2013.4

2013-11-22 Thread Robert Cimrman
support for 'plate' integration/connectivity type - script for visualization of quadrature points and weights For full release notes see http://docs.sfepy.org/doc/release_notes.html#id1 (rather long and technical). Best regards, Robert Cimrman and Contributors (*) (*) Contributors to th

Re: [Numpy-discussion] ANN: SfePy 2013.3

2013-09-18 Thread Robert Cimrman
Dear Josè, On 09/18/2013 07:10 PM, Josè Luis Mietta wrote: > Dear Robert. > > Im intresting in modeling mechanical deformation of magnetorheological > elastomers (material formed by inorganic chains inserting in a polymeric > matrix -see figure 2 in the attached file-). The inorganic chais are lik

[Numpy-discussion] ANN: SfePy 2013.3

2013-09-18 Thread Robert Cimrman
id1 (rather long and technical). Best regards, Robert Cimrman and Contributors (*) (*) Contributors to this release (alphabetical order): Vladimír Lukeš ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Incrementing with advanced indexing: why don't repeated indexes repeatedly increment?

2012-06-06 Thread Robert Cimrman
On 06/06/2012 06:35 PM, Robert Kern wrote: > On Wed, Jun 6, 2012 at 4:52 PM, Robert Cimrman wrote: > >> Yes (in that thread), but it applies also adding/assembling vectors into a >> global vector - this is just x[idx] += vals. I linked that discussion as that >> was recent

Re: [Numpy-discussion] Incrementing with advanced indexing: why don't repeated indexes repeatedly increment?

2012-06-06 Thread Robert Cimrman
On 06/06/2012 05:34 PM, Nathaniel Smith wrote: > On Wed, Jun 6, 2012 at 4:30 PM, Robert Cimrman wrote: >> On 06/06/2012 05:06 PM, Nathaniel Smith wrote: >>> On Wed, Jun 6, 2012 at 9:48 AM, John Salvatier >>> wrote: >>>> Hello, >>>> >>&g

Re: [Numpy-discussion] Incrementing with advanced indexing: why don't repeated indexes repeatedly increment?

2012-06-06 Thread Robert Cimrman
On 06/06/2012 05:06 PM, Nathaniel Smith wrote: > On Wed, Jun 6, 2012 at 9:48 AM, John Salvatier > wrote: >> Hello, >> >> I've noticed that If you try to increment elements of an array with advanced >> indexing, repeated indexes don't get repeatedly incremented. For example: >> >> In [30]: x = zer

Re: [Numpy-discussion] The NumPy Mandelbrot code 16x slower than Fortran

2012-01-23 Thread Robert Cimrman
On 01/23/12 13:51, Sturla Molden wrote: > Den 23.01.2012 13:09, skrev Sebastian Haase: >> >> I would think that interactive zooming would be quite nice >> ("illuminating") and for that 13 secs would not be tolerable >> Well... it's not at the top of my priority list ... ;-) >> > > Sure, t

Re: [Numpy-discussion] numpy.distutils quirk

2011-10-19 Thread Robert Cimrman
On 10/19/11 16:54, Robert Cimrman wrote: > On 10/18/11 22:13, Ralf Gommers wrote: >> On Tue, Oct 11, 2011 at 4:59 PM, Robert Cimrman wrote: >> >>> Hi, >>> >>> I have now spent several hours hunting down a major slowdown of my code >>> caused &

Re: [Numpy-discussion] numpy.distutils quirk

2011-10-19 Thread Robert Cimrman
On 10/18/11 22:13, Ralf Gommers wrote: > On Tue, Oct 11, 2011 at 4:59 PM, Robert Cimrman wrote: > >> Hi, >> >> I have now spent several hours hunting down a major slowdown of my code >> caused >> (apparently) by using config.add_library() for a reusable part

[Numpy-discussion] numpy.distutils quirk

2011-10-11 Thread Robert Cimrman
Hi, I have now spent several hours hunting down a major slowdown of my code caused (apparently) by using config.add_library() for a reusable part of C source files instead of just config.add_extension(). The reason of the slowdown was different, but hard to discern, naming of options and silen

Re: [Numpy-discussion] Cellular Automata Neighborhoods & Numpy

2011-03-20 Thread Robert Cimrman
Hi Michael, You can find the full game of life script at [1]. There is also Belousov-Zhabotinsky cellular automaton. Both have a strided version. r. [1] http://docs.sfepy.org/scientific-python-tutorial/examples - Reply message - From: "Michael Mersky" To: Subject: [Numpy-discussion]

Re: [Numpy-discussion] using loadtxt() for given number of rows?

2011-02-14 Thread Robert Cimrman
On Mon, 14 Feb 2011, Stéfan van der Walt wrote: Hi Robert On Mon, Jan 31, 2011 at 2:39 PM, Robert Cimrman wrote: It seems to me, that an additional parameter to loadtxt(), say "nrows" or "numrows", would do the job, so that the function does not try reading the

Re: [Numpy-discussion] using loadtxt() for given number of rows?

2011-02-01 Thread Robert Cimrman
On Mon, 31 Jan 2011, Christopher Barker wrote: > On 1/31/11 4:39 AM, Robert Cimrman wrote: >> I work with text files which contain several arrays separated by a few >> lines of other information, for example: >> >> POINTS 4 float >> -5.00e-01 -5.00

[Numpy-discussion] using loadtxt() for given number of rows?

2011-01-31 Thread Robert Cimrman
Hi, I work with text files which contain several arrays separated by a few lines of other information, for example: POINTS 4 float -5.00e-01 -5.00e-01 0.00e+00 5.00e-01 -5.00e-01 0.00e+00 5.00e-01 5.00e-01 0.00e+00 -5.00e-01 5.00e-01 0.00e+00 CELL

[Numpy-discussion] stride tricks for cellular automata

2010-10-18 Thread Robert Cimrman
FYI: I have added a new Cookbook entry, see [1], hoping that it might be useful to someone. The stride tricks are awesome! r. [1] http://scipy.org/Cookbook/GameOfLifeStrides ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.sci

Re: [Numpy-discussion] Commit rights on github

2010-10-12 Thread Robert Cimrman
Hi Fernando, On Tue, 12 Oct 2010, Fernando Perez wrote: 2010/10/12 Stéfan van der Walt : - Then: merge into master, getting a fast-forward merge if possible - Push back to github When I have large changes that consist of several commits on a single topic, I normally explicitly ask for a non-f

Re: [Numpy-discussion] allclose() does not check shape of inputs

2009-11-13 Thread Robert Cimrman
Pauli Virtanen wrote: > Fri, 13 Nov 2009 11:54:51 +0100, Robert Cimrman wrote: >> I think this is a bug: >> >> In [16]: np.allclose([1.0, 1.0], [1.1], rtol=0.1, atol=0.0) >> Out[16]: True > > It's broadcasting. I'm not sure it is a bug: > >>

[Numpy-discussion] allclose() does not check shape of inputs

2009-11-13 Thread Robert Cimrman
Hi, I think this is a bug: In [16]: np.allclose([1.0, 1.0], [1.1], rtol=0.1, atol=0.0) Out[16]: True Shall I create a ticket? r. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] numpy distutils and cython

2009-11-03 Thread Robert Cimrman
Hi, I am using numpy distutils to build the extension modules of a project, which have been so far written in C, and wrapped by SWIG. Now I would like to try cython (as everynone!), but still be able to use the numpy distutils. I have found the thread [1], which offers some solution, but it doe

Re: [Numpy-discussion] intersect1d for N input arrays

2009-10-16 Thread Robert Cimrman
Hi Martin, thanks for your ideas and contribution. A few notes: I would let intersect1d as it is, and created a new function with another name for that (any proposals?). Considering that most of arraysetops functions are based on sort, and in particular here that an intersection array is (usua

Re: [Numpy-discussion] simple indexing question

2009-09-23 Thread Robert Cimrman
josef.p...@gmail.com wrote: > On Wed, Sep 23, 2009 at 11:12 AM, Neal Becker wrote: >> Robert Cimrman wrote: >> >>> Neal Becker wrote: >>>> I have an array: >>>> In [12]: a >>>> Out[12]: >>>> array([[0, 1, 2, 3, 4], >&g

Re: [Numpy-discussion] simple indexing question

2009-09-23 Thread Robert Cimrman
Neal Becker wrote: > I have an array: > In [12]: a > Out[12]: > array([[0, 1, 2, 3, 4], >[5, 6, 7, 8, 9]]) > > And a selection array: > In [13]: b > Out[13]: array([1, 1, 1, 1, 1]) > > I want a 1-dimensional output, where the array b selects an element from > each column of a, where if

Re: [Numpy-discussion] improving arraysetops

2009-06-17 Thread Robert Cimrman
Hi Neil, Neil Crighton wrote: >>> What about merging unique and unique1d? They're essentially identical for >>> an >>> array input, but unique uses the builtin set() for non-array inputs and so >>> is >>> around 2x faster in this case - see below. Is it worth accepting a speed >>> regression fo

Re: [Numpy-discussion] improving arraysetops

2009-06-15 Thread Robert Cimrman
Neil Crighton wrote: > Robert Cimrman ntc.zcu.cz> writes: > >> Hi, >> >> I am starting a new thread, so that it reaches the interested people. >> Let us discuss improvements to arraysetops (array set operations) at [1] >> (allowing non-unique arra

[Numpy-discussion] improving arraysetops

2009-06-09 Thread Robert Cimrman
Hi, I am starting a new thread, so that it reaches the interested people. Let us discuss improvements to arraysetops (array set operations) at [1] (allowing non-unique arrays as function arguments, better naming conventions and documentation). r. [1] http://projects.scipy.org/numpy/ticket/1133

Re: [Numpy-discussion] setmember1d_nu

2009-06-09 Thread Robert Cimrman
Neil Crighton wrote: > Robert Cimrman ntc.zcu.cz> writes: > >>>> I'd really like to see the setmember1d_nu function in ticket 1036 get into >>>> numpy. There's a patch waiting for review that including tests: >>>> >>>> http://pro

Re: [Numpy-discussion] setmember1d_nu

2009-06-08 Thread Robert Cimrman
Robert Cimrman wrote: > Hi Neil, > > Neil Crighton wrote: >> Hi all, >> >> I posted this message couple of days ago, but gmane grouped it with an old >> thread and it hasn't shown up on the front page. So here it is again... >> >> I'd really

Re: [Numpy-discussion] extract elements of an array that are contained in another array?

2009-06-08 Thread Robert Cimrman
Robert Cimrman wrote: > Hi Josef, > > thanks for the summary! I am responding below, later I will make an > enhancement ticket. Done, see http://projects.scipy.org/numpy/ticket/1133 r. ___ Numpy-discussion mailing list Numpy-discussion@sc

Re: [Numpy-discussion] extract elements of an array that are contained in another array?

2009-06-08 Thread Robert Cimrman
Hi Josef, thanks for the summary! I am responding below, later I will make an enhancement ticket. josef.p...@gmail.com wrote: > On Sat, Jun 6, 2009 at 4:42 AM, Neil Crighton wrote: >> Robert Cimrman ntc.zcu.cz> writes: >> >>> Anne Archibald wrote: >>&g

Re: [Numpy-discussion] extract elements of an array that are contained in another array?

2009-06-04 Thread Robert Cimrman
josef.p...@gmail.com wrote: > On Fri, Jun 5, 2009 at 1:48 AM, Robert Cimrman wrote: >> josef.p...@gmail.com wrote: >>> On Thu, Jun 4, 2009 at 4:30 PM, Gael Varoquaux >>> wrote: >>>> On Thu, Jun 04, 2009 at 10:27:11PM +0200, Kim Hansen wrote: >>>

Re: [Numpy-discussion] extract elements of an array that are contained in another array?

2009-06-04 Thread Robert Cimrman
josef.p...@gmail.com wrote: > On Thu, Jun 4, 2009 at 4:30 PM, Gael Varoquaux > wrote: >> On Thu, Jun 04, 2009 at 10:27:11PM +0200, Kim Hansen wrote: >>> "in(b)" or "in_iterable(b)" method, such that you could do a.in(b) >>> which would return a boolean array of the same shape as a with >>> element

Re: [Numpy-discussion] extract elements of an array that are contained in another array?

2009-06-04 Thread Robert Cimrman
Anne Archibald wrote: > 2009/6/4 : > >> intersect1d should throw a domain error if you give it arrays with >> non-unique elements, which is not done for speed reasons > > It seems to me that this is the basic source of the problem. Perhaps > this can be addressed? I realize maintaining compatibi

Re: [Numpy-discussion] extract elements of an array that are contained in another array?

2009-06-04 Thread Robert Cimrman
Kim Hansen wrote: > Concerning the name setmember1d_nu, I personally find it quite verbose > and not the name I would expect as a non-insider coming to numpy and > not knowing all the names of the more special hidden-away functions > and not being a python-wiz either. To explain the naming: those

Re: [Numpy-discussion] extract elements of an array that are contained in another array?

2009-06-04 Thread Robert Cimrman
josef.p...@gmail.com wrote: > On Thu, Jun 4, 2009 at 2:58 PM, Alan G Isaac wrote: >> On 6/4/2009 1:27 PM josef.p...@gmail.com apparently wrote: >>> Note: there are two versions of the docs for np.intersect1d, the >>> currently published docs which describe the actual behavior (for the >>> non-uniq

Re: [Numpy-discussion] extract elements of an array that are contained in another array?

2009-06-04 Thread Robert Cimrman
Alan G Isaac wrote: > On 6/4/2009 10:50 AM josef.p...@gmail.com apparently wrote: >> intersect1d gives set intersection if both arrays have >> only unique elements (i.e. are sets). I thought the >> naming is pretty clear: > >> intersect1d(a,b) set intersection if a and b with unique elements

Re: [Numpy-discussion] setmember1d_nu

2009-06-04 Thread Robert Cimrman
Hi Neil, Neil Crighton wrote: > Hi all, > > I posted this message couple of days ago, but gmane grouped it with an old > thread and it hasn't shown up on the front page. So here it is again... > > I'd really like to see the setmember1d_nu function in ticket 1036 get into > numpy. There's a patc

Re: [Numpy-discussion] building inplace with numpy.distutils?

2009-05-13 Thread Robert Cimrman
David Cournapeau wrote: > Robert Cimrman wrote: >> Hi (David)! >> >> I am evaluating numpy.distutils as a build/install system for my project >> - is it possible to build the extension modules in-place so that the >> project can be used without installin

[Numpy-discussion] building inplace with numpy.distutils?

2009-05-13 Thread Robert Cimrman
Hi (David)! I am evaluating numpy.distutils as a build/install system for my project - is it possible to build the extension modules in-place so that the project can be used without installing it? A pointer to documentation concerning this would be handy... Currently I use a regular Makefile f

Re: [Numpy-discussion] Fwd: Fast numpy array visualization

2009-04-03 Thread Robert Cimrman
Stéfan van der Walt wrote: > Hi all, > > Nicolas Rougier is doing some fun things with Pyglet and IPython! Awesome! r. > -- Forwarded message -- > From: Nicolas Rougier > Date: 2009/4/3 > Subject: Fast numpy array visualization > To: pyglet-users > > Hi all, > > I've adapted t

Re: [Numpy-discussion] [Announce] Numpy 1.3.0 rc1

2009-03-30 Thread Robert Cimrman
Hi, It might be too late (I was off-line last week), but anyway: I have set the milestone for the ticket 1036 [1] to 1.4, but it does not change the existing functionality, brings some new one, and the tests pass, so I wonder if it could get it into the 1.3 release? cheers, r. [1] http://proje

Re: [Numpy-discussion] setmember1d_nu

2009-03-19 Thread Robert Cimrman
Re-hi! Robert Cimrman wrote: > Hi all, > > I have added to the ticket [1] a script that compares the proposed > setmember1d_nu() implementations of Neil and Kim. Comments are welcome! > > [1] http://projects.scipy.org/numpy/ticket/1036 I have attached a patch incorporating

[Numpy-discussion] setmember1d_nu

2009-03-06 Thread Robert Cimrman
Hi all, I have added to the ticket [1] a script that compares the proposed setmember1d_nu() implementations of Neil and Kim. Comments are welcome! [1] http://projects.scipy.org/numpy/ticket/1036 r. ___ Numpy-discussion mailing list Numpy-discussion@sc

Re: [Numpy-discussion] Numpy array in iterable

2009-03-05 Thread Robert Cimrman
Kim Hansen wrote: >> 2009/3/5 Robert Cimrman : >> I have added your implementation to >> http://projects.scipy.org/numpy/ticket/1036 - is it ok with you to add >> the function eventually into arraysetops.py, under the numpy (BSD) license? >> >> cheers, >&g

Re: [Numpy-discussion] Numpy array in iterable

2009-03-05 Thread Robert Cimrman
Kim Hansen wrote: > Hi again > > It turned out not to be quite good enough as is, as it requires unique > values for both arrays. Whereas this is often true for the second > argument, it is never true for the first argument in my use case, and > I struggled with that for some time until i realized

Re: [Numpy-discussion] Faster way to generate a rotation matrix?

2009-03-04 Thread Robert Cimrman
Jonathan Taylor wrote: > Sorry.. obviously having some copy and paste trouble here. The > message should be as follows: > > Hi, > > I am doing optimization on a vector of rotation angles tx,ty and tz > using scipy.optimize.fmin. Unfortunately the function that I am > optimizing needs the rotati

Re: [Numpy-discussion] intersect1d and setmember1d

2009-03-04 Thread Robert Cimrman
Robert Cimrman wrote: > Neil Crighton wrote: >> Robert Kern gmail.com> writes: >> >>> Do you mind if we just add you to the THANKS.txt file, and consider >>> you as a "NumPy Developer" per the LICENSE.txt as having released that >>> cod

Re: [Numpy-discussion] intersect1d and setmember1d

2009-03-04 Thread Robert Cimrman
Neil Crighton wrote: > Robert Kern gmail.com> writes: > >> Do you mind if we just add you to the THANKS.txt file, and consider >> you as a "NumPy Developer" per the LICENSE.txt as having released that >> code under the numpy license? If we're dotting our i's and crossing >> our t's legally, that'

Re: [Numpy-discussion] intersect1d and setmember1d

2009-03-02 Thread Robert Cimrman
Neil wrote: > mudit sharma yahoo.com> writes: > >> intersect1d and setmember1d doesn't give expected results in case there are > duplicate values in either >> array becuase it works by sorting data and substracting previous value. Is > there an alternative in numpy >> to get indices of intersecte

Re: [Numpy-discussion] intersect1d and setmember1d

2009-02-27 Thread Robert Cimrman
Zachary Pincus wrote: > Hi, > >> intersect1d and setmember1d doesn't give expected results in case >> there are duplicate values in either array becuase it works by >> sorting data and substracting previous value. Is there an >> alternative in numpy to get indices of intersected values. > > Fr

Re: [Numpy-discussion] concatenate trouble

2009-01-30 Thread Robert Cimrman
Neal Becker wrote: > What's the problem here? > > print np.concatenate (np.ones (10, dtype=complex), np.zeros (10, > dtype=complex)) > TypeError: only length-1 arrays can be converted to Python scalars You should enclose the arrays you concatenate into a tuple: np.concatenate((a,b)). r. _

Re: [Numpy-discussion] array manipulation

2009-01-22 Thread Robert Cimrman
Nils Wagner wrote: > Hi all, > > what is the best way to check if the entries (integers) > of an array are stored in ascending order ? Hi Nils, Try np.alltrue( ar[1:] > ar[:-1] ). r. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://

Re: [Numpy-discussion] limit function

2009-01-15 Thread Robert Cimrman
Neal Becker wrote: > Is there a function to apply a limit to an array? I want to (efficiently) do: > > y = x if x < limit, otherwise limit What about np.clip? r. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/m

Re: [Numpy-discussion] unique1d and asarray

2009-01-05 Thread Robert Cimrman
Pierre GM wrote: > On Jan 4, 2009, at 4:47 PM, Robert Kern wrote: > >> On Sun, Jan 4, 2009 at 15:44, Pierre GM wrote: >>> If we used np.asanyarray instead, subclasses are recognized properly, >>> the mask is recognized by argsort and the result correct. >>> Is there a reason why we use np.asarray

Re: [Numpy-discussion] Find index of repeated numbers in array

2008-12-10 Thread Robert Cimrman
Ross Williamson wrote: > Hi Everyone > > I think I'm missing something really obvious but what I would like to > do is extract the indexes from an array where a number matches - For > example > > data = [0,1,2,960,5,6,960,7] > > I would like to know, for example the indices which match 960 -

Re: [Numpy-discussion] profiling line by line

2008-09-21 Thread Robert Cimrman
Robert Kern wrote: > On Sun, Sep 21, 2008 at 02:26, Robert Cimrman <[EMAIL PROTECTED]> wrote: >> Cool, then I have another one: >> >> $ ./kernprof.py -l pystone.py >> Traceback (most recent call last): >> File "./kernprof.py", line 17

Re: [Numpy-discussion] profiling line by line

2008-09-21 Thread Robert Cimrman
Robert Kern wrote: > On Sun, Sep 21, 2008 at 02:09, Robert Cimrman <[EMAIL PROTECTED]> wrote: >> Robert Kern wrote: >>> On Fri, Sep 19, 2008 at 07:00, Robert Cimrman <[EMAIL PROTECTED]> wrote: >>>> Robert Kern wrote: >>>>> Ah, found

Re: [Numpy-discussion] profiling line by line

2008-09-21 Thread Robert Cimrman
Robert Kern wrote: > On Fri, Sep 19, 2008 at 07:00, Robert Cimrman <[EMAIL PROTECTED]> wrote: >> Robert Kern wrote: >>> Ah, found it. T_LONGLONG is a #define from structmember.h which is >>> used to describe the types of attributes. Apparently, this was not

Re: [Numpy-discussion] profiling line by line

2008-09-19 Thread Robert Cimrman
Robert Kern wrote: > Ah, found it. T_LONGLONG is a #define from structmember.h which is > used to describe the types of attributes. Apparently, this was not > added until Python 2.5. That particular member didn't actually need to > be long long, so I've fixed that. Great, I will try it after it ap

Re: [Numpy-discussion] profiling line by line

2008-09-19 Thread Robert Cimrman
Ondrej Certik wrote: > On Thu, Sep 18, 2008 at 4:12 PM, Ryan May <[EMAIL PROTECTED]> wrote: >> Ondrej Certik wrote: >>> On Thu, Sep 18, 2008 at 1:01 PM, Robert Cimrman <[EMAIL PROTECTED]> wrote: >>>>> It requires Cython and a C compiler to build. I&#x

Re: [Numpy-discussion] profiling line by line

2008-09-19 Thread Robert Cimrman
Robert Kern wrote: > On Thu, Sep 18, 2008 at 06:01, Robert Cimrman <[EMAIL PROTECTED]> wrote: >> Hi Robert, >> >> Robert Kern wrote: >>> On Mon, Sep 15, 2008 at 11:13, Arnar Flatberg <[EMAIL PROTECTED]> wrote: >>>> That would make me a

Re: [Numpy-discussion] profiling line by line

2008-09-18 Thread Robert Cimrman
Hi Robert, Robert Kern wrote: > On Mon, Sep 15, 2008 at 11:13, Arnar Flatberg <[EMAIL PROTECTED]> wrote: >> That would make me an extremely happy user, I've been looking for this for >> years! >> I can't imagine I'm the only one who profiles some hundred lines of code and >> ends up with 90% of to

Re: [Numpy-discussion] unique1d returning indices

2008-08-14 Thread Robert Cimrman
Stéfan van der Walt wrote: > 2008/8/13 Robert Cimrman <[EMAIL PROTECTED]>: >>> Yeah, that's why I think not many people used the extra return anyway. >>> I will do as you say unless somebody steps in. >> ... but not before August 25, as I am about to leave on

Re: [Numpy-discussion] unique1d returning indices

2008-08-13 Thread Robert Cimrman
Robert Cimrman wrote: > Stéfan van der Walt wrote: >> 2008/8/11 Robert Cimrman <[EMAIL PROTECTED]>: >>>>> Note also that the order of outputs has changed (previously unique1d() >>>>> returned (i, b) for return_index=True). >>>> Does this

Re: [Numpy-discussion] unique1d returning indices

2008-08-11 Thread Robert Cimrman
Stéfan van der Walt wrote: > 2008/8/11 Robert Cimrman <[EMAIL PROTECTED]>: >>>> Note also that the order of outputs has changed (previously unique1d() >>>> returned (i, b) for return_index=True). >>> Does this not constitute an API change? >&

Re: [Numpy-discussion] unique1d returning indices

2008-08-11 Thread Robert Cimrman
Hi Stéfan, Stéfan van der Walt wrote: > Hi Robert > > 2008/8/6 Robert Cimrman <[EMAIL PROTECTED]>: >> Note also that the order of outputs has changed (previously unique1d() >> returned (i, b) for return_index=True). > > Does this not constitute an API change?

[Numpy-discussion] unique1d returning indices

2008-08-06 Thread Robert Cimrman
Hi, due to popular demand, I have updated unique1d() to optionally return both kinds of indices: In [3]: b, i, j = nm.unique1d( a, return_index=True, return_inverse=True ) In [4]: a Out[4]: array([1, 1, 8, 3, 3, 5, 4]) In [6]: b Out[6]: array([1, 3, 4, 5, 8]) In [7]: a[i] Out[7]: array([1,

Re: [Numpy-discussion] member1d and unique elements

2008-08-06 Thread Robert Cimrman
Hi Greg, Greg Novak wrote: > Argh. I could swear that yesterday I typed test cases just like the > one you provide, and it behaved correctly. Nevertheless, it clearly > fails in spite of my memory, so attached is a version which I believe > gives the correct behavior. It looks ok now, although

Re: [Numpy-discussion] member1d and unique elements

2008-08-05 Thread Robert Cimrman
Greg Novak wrote: > I have two arrays of integers, and would like to know _where_ they > have elements in common, not just _which_ elements are in common. > This is because the entries in the integer array are aligned with > other arrays. This seems very close to what member1d advertises as > its

Re: [Numpy-discussion] [SciPy-user] unique, sort, sortrows

2008-07-26 Thread Robert Cimrman
Hi David, I can comment on unique1d, as I am the culprit. I am cc'ing to numpy-discussion as this is a numpy function. Quoting "David M. Kaplan" <[EMAIL PROTECTED]>: > 2) Is there a simple equivalent of sortrows(a) (i.e., sorting by entire > rows)? Similarly, is there a simple equivalent of th

[Numpy-discussion] ANN: SfePy 00.46.02

2008-07-01 Thread Robert Cimrman
/004602_RELEASE_NOTES.txt If you happen to come to Leipzig for EuroSciPy 2008, see you there! Best regards, Robert Cimrman & SfePy developers ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/n

[Numpy-discussion] set_printoptions - floating point format option?

2008-06-23 Thread Robert Cimrman
Hi, I need to display some numpy arrays in mantissa+exponent format (e.g. '%.2e' using C syntax). In numpy.set_printoptions(), there is currently only 'precision' option, which does not allow this. What about having an option related to 'precision', named possibly 'float_format', with the foll

Re: [Numpy-discussion] Matrix Class [was numpy release]

2008-04-29 Thread Robert Cimrman
Bill Spotz wrote: > On Apr 28, 2008, at 10:47 PM, Bill Spotz wrote: > >> As for this example, my version should work with a properly >> implemented sparse_matrix A, but the array approach precludes that. >> That is to say, I could convert A to a matrix if it is provided as an >> array, but you cou

Re: [Numpy-discussion] ANN: SfePy 00.41.03

2008-03-26 Thread Robert Cimrman
Christopher Barker wrote: > Robert Cimrman wrote: >> I'm pleased to announce the release 00.41.03 of SfePy (formerly SFE) > > very cool! Thanks! > Totally off-topic, but how did you build that nifty pdf slide show? > (introduction_slide.pdf) http://latex-beamer.sou

[Numpy-discussion] ANN: SfePy 00.41.03

2008-03-26 Thread Robert Cimrman
Greetings, I'm pleased to announce the release 00.41.03 of SfePy (formerly SFE) SfePy is a finite element analysis software in Python, based primarily on Numpy and SciPy. Mailing lists, issue tracking, mercurial repository: http://code.google.com/p/sfepy/ Home page: http://sfepy.kme.zcu.cz Ma

[Numpy-discussion] ANN: SFE-00.35.01

2007-12-14 Thread Robert Cimrman
Let me announce SFE-00.35.01, bringing per term integration - now each term can use its own quadrature points. This is a major change at the heart of the code - some parts may not work as all terms were not migrated yet to the new framework. All test examples work, though, as well as acoustic b

Re: [Numpy-discussion] documentation generator based on pyparsing

2007-11-30 Thread Robert Cimrman
Nils Wagner wrote: > Thank you for your note. It works fine for me with > python2.5. However python2.3 results in > > ./gendocs.py -m 'scipy.linsolve.umfpack' > Traceback (most recent call last): >File "./gendocs.py", line 261, in ? > main() >File "./gendocs.py", line 207, in main >

Re: [Numpy-discussion] documentation generator based on pyparsing

2007-11-29 Thread Robert Cimrman
Hi Nils, Nils Wagner wrote: > The output of > > ./gendocs.py -m 'scipy.linsolve.umfpack' > > differs from your example output (available at > http://scipy.org/Generate_Documentation) I had to update the umfpack info.py file (where the module docstring is) to conform the documentation standards

[Numpy-discussion] documentation generator based on pyparsing

2007-11-28 Thread Robert Cimrman
Hi, At http://scipy.org/Generate_Documentation you can find a very small documentation generator for NumPy/SciPy modules based on pyparsing package (by Paul McGuire). I am not sure if this belongs to where I put it, so feel free to (re)move the page as needed. I hope it might be interesting fo

Re: [Numpy-discussion] numpy : your experiences?

2007-11-21 Thread Robert Cimrman
Rahul Garg wrote: > It would be awesome if you guys could respond to some of the following > questions : > a) Can you guys tell me briefly about the kind of problems you are > tackling with numpy and scipy? I am using both numpy and scipy to solve PDEs in the context of finite element method (ela

[Numpy-discussion] ANN: SFE-00.31.06 release

2007-10-23 Thread Robert Cimrman
I am happy to announce the version 00.31.06 of SFE, featuring acoustic band gaps computation, rigid body motion constraints, new solver classes and reorganization, and regular bug fixes and updates, see http://ui505p06-mbs.ntc.zcu.cz/sfe. SFE is a finite element analysis software written almost en

Re: [Numpy-discussion] Naming a slice index?

2007-10-01 Thread Robert Cimrman
Eagle Jones wrote: > New to python and numpy; hopefully I'm missing something obvious. I'd > like to be able to slice an array with a name. For example: > > _T = 6:10 _T = slice( 6, 10 ) ... ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

Re: [Numpy-discussion] Count the occurrence of a certain integer in a list of integers

2007-08-07 Thread Robert Cimrman
Nils Wagner wrote: > Hi all, > > I have a list of integer numbers. The entries can vary between 0 and 19. > How can I count the occurrence of any number. Consider > > >>> data > [9, 6, 9, 6, 7, 9, 9, 10, 7, 9, 9, 6, 7, 9, 8, 8, 11, 9, 6, 7, 10, 9, 7, 9, > 7, 8, 9, 8, 7, 9] > > > Is there a be

Re: [Numpy-discussion] array vs. matrix performance

2007-05-22 Thread Robert Cimrman
Re-hi, thanks for all the comments. I have re-tried with X = nm.random.rand( 1, 3 ) and the times (in seconds) were: 428.588043213 # scipy.dot, array 445.045716047 # numpy.dot, array 519.489458799 # scipy.dot, matrix 513.328601122 # numpy.dot, matrix The scipy.dot and numpy.dot performs the

[Numpy-discussion] array vs. matrix performance

2007-05-21 Thread Robert Cimrman
I have come to a case where using a matrix would be easier than an array. The code uses lots of dot products, so I tested scipy.dot() performance with the code below and found that the array version is much faster (about 3 times for the given shape). What is the reason for this? Or is something wro

Re: [Numpy-discussion] Tuning sparse stuff in NumPy

2007-03-27 Thread Robert Cimrman
David Koch wrote: > On 3/27/07, Robert Cimrman <[EMAIL PROTECTED]> wrote: >> >> >> ok. now which version of scipy (scipy.__version__) do you use (you may >> have posted it, but I missed it)? Not so long ago, there was an effort >> by Nathan Bell and others re

Re: [Numpy-discussion] Tuning sparse stuff in NumPy

2007-03-27 Thread Robert Cimrman
David Koch wrote: > Ok, > > I did and the results are: > csc * csc: 372.601957083 > csc * csc: 3.90811300278 a typo here? which one is csr? > csr * csc: 15.3202679157 > csr * csr: 3.84498214722 > > Mhm, quite insightful. Note, that in an operation X.transpose() * X, > where X > is csc_matrix,

Re: [Numpy-discussion] Tuning sparse stuff in NumPy

2007-03-26 Thread Robert Cimrman
David Koch wrote: > On 3/26/07, Robert Cimrman <[EMAIL PROTECTED]> wrote: >> >> Could you be more specific on which type of the sparse matrix storage >> did you use? > > > > Hi Robert, > > I used csc_matrix. OK, good. Would you mind measuring csc

  1   2   >