[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
and 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
for 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

[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
and 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
and 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 this release

[Numpy-discussion] ANN: SfePy 2013.3

2013-09-18 Thread Robert Cimrman
). 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] 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 like

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 jsalv...@u.washington.edu 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

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 Cimrmancimrm...@ntc.zcu.cz wrote: On 06/06/2012 05:06 PM, Nathaniel Smith wrote: On Wed, Jun 6, 2012 at 9:48 AM, John Salvatier jsalv...@u.washington.eduwrote: Hello, I've noticed that If you try to

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 Cimrmancimrm...@ntc.zcu.cz 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 enough for

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, that comes

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 Cimrmancimrm...@ntc.zcu.cz 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 of C source files instead of

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 m...@mydis.org To:

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 cimrm...@ntc.zcu.cz 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 entire file

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.00e-01 0.00e+00 5.00e-01 -5.00e-01

[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

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 ste...@sun.ac.za: - 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

[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

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: np.allclose([1.0, 1.0], [1.1, 1.1, 1.1], rtol=0.1, atol=0.0) False

[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

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

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 b[i]=0

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 ndbeck...@gmail.com wrote: Robert Cimrman wrote: 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

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 for unique to get

Re: [Numpy-discussion] improving arraysetops

2009-06-15 Thread Robert Cimrman
Neil Crighton wrote: Robert Cimrman cimrman3 at 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 arrays as function arguments, better naming

Re: [Numpy-discussion] setmember1d_nu

2009-06-09 Thread Robert Cimrman
Neil Crighton wrote: Robert Cimrman cimrman3 at 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://projects.scipy.org/numpy/ticket/1036 Is there anything I can do to help get

[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]

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 neilcrigh...@gmail.com wrote: Robert Cimrman cimrman3 at ntc.zcu.cz writes: Anne Archibald wrote: 1. add a keyword

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@scipy.org http

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 like to see the setmember1d_nu function in ticket 1036 get

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

2009-06-05 Thread Robert Cimrman
josef.p...@gmail.com wrote: On Fri, Jun 5, 2009 at 1:48 AM, Robert Cimrman cimrm...@ntc.zcu.cz wrote: josef.p...@gmail.com wrote: On Thu, Jun 4, 2009 at 4:30 PM, Gael Varoquaux gael.varoqu...@normalesup.org wrote: On Thu, Jun 04, 2009 at 10:27:11PM +0200, Kim Hansen wrote: in(b

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 patch

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] 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 ais...@american.edu 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

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
Anne Archibald wrote: 2009/6/4 josef.p...@gmail.com: 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

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 gael.varoqu...@normalesup.org 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

[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

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 installing it? A pointer to documentation concerning

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 the code

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]

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 the solution

[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

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 I

Re: [Numpy-discussion] Numpy array in iterable

2009-03-05 Thread Robert Cimrman
Kim Hansen wrote: 2009/3/5 Robert Cimrman cimrm...@ntc.zcu.cz: 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, r. Yes, that would be fine with me

Re: [Numpy-discussion] intersect1d and setmember1d

2009-03-04 Thread Robert Cimrman
Neil Crighton wrote: Robert Kern robert.kern at 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,

Re: [Numpy-discussion] intersect1d and setmember1d

2009-03-04 Thread Robert Cimrman
Robert Cimrman wrote: Neil Crighton wrote: Robert Kern robert.kern at 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

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 rotation

Re: [Numpy-discussion] intersect1d and setmember1d

2009-03-02 Thread Robert Cimrman
Neil wrote: mudit sharma mudit_19a at 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

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. From the

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

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

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 pgmdevl...@gmail.com 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

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 - i.e.

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 added until Python 2.5. That particular member

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 it. T_LONGLONG is a #define from structmember.h which is used to describe the types

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 173, in ? sys.exit(main(sys.argv)) File ./kernprof.py, line 138

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 an extremely happy user, I've been looking for this for years! I can't imagine

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'm still debating myself about the desired workflow for using

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

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 holidays and have not managed to do it yet. I do

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 not constitute an API change? It does. Are there many users of unique1d

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? It does. Are there many users of unique1d( a, return_index=True ) out

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 I

[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-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

[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/numpy

[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

[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

[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

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 default

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. The

[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

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

[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

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 better way than

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 reimplementing sparsetools + scipy.sparse to get

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 * csr, csc * csc, csr * csc and csr * csr? I am curious how

Re: [Numpy-discussion] Matlab - NumPy translation and indexing

2007-03-14 Thread Robert Cimrman
David Koch wrote: Hi, so one thing I came across now is the following, very simple: Matlab: A = [] while A = [A some_scalar_value] end In Python, I tried: A = empty((0,0)) while A = concatenate((A, array([someScalarValue])), 1) end which returns an error

Re: [Numpy-discussion] Managing Rolling Data

2007-02-22 Thread Robert Cimrman
Alexander Michael wrote: I'm new to numpy and looking for advice on setting up and managing array data for my particular problem. I'm collecting observations of P properties for N objects over a rolling horizon of H sample times. I could conceptually store the data in three-dimensional array

Re: [Numpy-discussion] getting indices for array positions

2007-02-07 Thread Robert Cimrman
Christian Meesters wrote: Hi This questions might seem stupid, but I didn't get a clever solution myself, or found one in the archives, the cookbook, etc. . If I overlooked something, please give a pointer. Well, if I have an 1D array like [ 0. , 0.1, 0.2, 0.3, 0.4, 0.5] ,a

Re: [Numpy-discussion] getting indices for array positions

2007-02-07 Thread Robert Cimrman
Christian Meesters wrote: Try searchsorted. Thanks, but that doesn't work. Sorry, if my question wasn't clear. To illustrate the requirement: For instance: a array([ 0. , 0.1, 0.2, 0.3, 0.4]) # should be 1 ... a.searchsorted(0.11) 2 # should be 2 ... a.searchsorted(0.16) 2 I

Re: [Numpy-discussion] setmember1d memory leak?

2007-01-25 Thread Robert Cimrman
Charles R Harris wrote: On 1/24/07, Charles R Harris [EMAIL PROTECTED] wrote: On 1/24/07, Robert Cimrman [EMAIL PROTECTED] wrote: Robert Kern wrote: Robert Cimrman wrote: Or you could just call unique1d prior to your call to setmember1d - it was meant to be used that way... you