Re: [Numpy-discussion] dimension along axis?

2009-04-13 Thread Grissiom
> Out[4]: (1, 3) > > Chuck > > This is exactly what I want. Thanks ;) -- Cheers, Grissiom ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] dimension along axis?

2009-04-13 Thread Grissiom
appear in different position so it's inconvenient to identify them. Is there anyway to get dimension along axis? (In this case should be axis0) -- Cheers, Grissiom ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/m

Re: [Numpy-discussion] DVCS at PyCon

2009-04-09 Thread Grissiom
use git for my own project and enjoy working with it. You may find some useful documentation here: http://git-scm.com/ and a tutorial: http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html What really lacks is a little bit learning and using. -- Cheers, Grissiom ___

Re: [Numpy-discussion] DVCS at PyCon

2009-04-09 Thread Grissiom
:) > > > I never commit to svn from the command line, only with a gui that lets > me easily browse any changes that I am about to commit. I use the > command line for checkouts and updates. > > If you want to do visualized commit in git, try "git citool" ;) -- Che

Re: [Numpy-discussion] using assertEqual in unittest to test two np.ndarray?

2009-03-21 Thread Grissiom
ual, desired, decimal=7, err_msg='', > verbose=True) >Raise an assertion if two items are not equal. > > I think this should be part of unittest.py > >The test i > > ... > Thanks really~ It helped a lot. ;) -- Cheers, Grissiom _

Re: [Numpy-discussion] using assertEqual in unittest to test two np.ndarray?

2009-03-20 Thread Grissiom
== So I have to dir it to see is there any other useful functions. It will be perfect to document package method like assert_equal here. Thanks very much~;) -- Cheers, Grissiom ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] using assertEqual in unittest to test two np.ndarray?

2009-03-20 Thread Grissiom
Use a.any() or a.all() -- Ran 2 tests in 0.003s FAILED (errors=1) I know I should use array_equal to test two arrays but it will be more convenient to implement it as __eq__. Any hints? Thanks in advance.

Re: [Numpy-discussion] linalg.norm along axis?

2009-02-18 Thread Grissiom
On Thu, Feb 19, 2009 at 12:12, Nicolas Pinto wrote: > Grissiom, > > Using the following doesn't require any loop: > > In [9]: sqrt((a**2.).sum(1)) > Out[9]: array([ 5., 10.]) > > Best, > > Got it~ Thanks really ;) -- Cheers, Grissiom __

[Numpy-discussion] linalg.norm along axis?

2009-02-18 Thread Grissiom
Hi all, Is there any possibility to calculate norm along axis? For example: a = np.array(( (3,4), (6,8))) And I want to get: array([5.0, 10.0]) I currently use a for loop to achieve this, Is there any more elegant way to do this? -- Cheers, Grissiom

Re: [Numpy-discussion] minor improvment to ones

2009-01-30 Thread Grissiom
On Fri, Jan 30, 2009 at 22:16, Sturla Molden wrote: > On 1/30/2009 3:07 PM, Grissiom wrote: > > > Is fill function has any advantage over ones(size)*x ? > > You avoid filling with ones, all the multiplications and creating an > temporary array. It can be done like this: &g

Re: [Numpy-discussion] minor improvment to ones

2009-01-30 Thread Grissiom
tiny brain realized > you meant the ndarray method: > > http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.fill.html > > Cheers, > Scott > Is fill function has any advantage over ones(size)*x ? -- Cheers, Grissiom ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Numpy performance vs Matlab.

2009-01-07 Thread Grissiom
e, %f sec" % end > > # > > > Any idea on it ? > > Did I missed something ? > > I think you may have reduced the complexity a bit too much. The python > code > above sets all of the elem

Re: [Numpy-discussion] Failing to build numpy properly on Ubuntu Hardy

2008-12-10 Thread Grissiom
On Thu, Dec 11, 2008 at 15:13, David Cournapeau < [EMAIL PROTECTED]> wrote: > Grissiom wrote: > > I have encountered with such problem before. My solution is recompile > > the problem package(maybe atlas in your case) with -ff2c option passed > > to gfortran. > >

Re: [Numpy-discussion] Failing to build numpy properly on Ubuntu Hardy

2008-12-10 Thread Grissiom
ve encountered with such problem before. My solution is recompile the problem package(maybe atlas in your case) with -ff2c option passed to gfortran. -- Cheers, Grissiom ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] How to unitize a array in numpy?

2008-12-09 Thread Grissiom
On Wed, Dec 10, 2008 at 11:04, Robert Kern <[EMAIL PROTECTED]> wrote: > v / numpy.linalg.norm(v) > Thanks a lot ~;) -- Cheers, Grissiom ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/li

Re: [Numpy-discussion] How to unitize a array in numpy?

2008-12-09 Thread Grissiom
On Wed, Dec 10, 2008 at 10:36, Robert Kern <[EMAIL PROTECTED]> wrote: > On Tue, Dec 9, 2008 at 20:24, Grissiom <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > Nice to neet you all. I am a newbie in numpy. Is there any function that > > could unitize a arra

[Numpy-discussion] How to unitize a array in numpy?

2008-12-09 Thread Grissiom
Hi all, Nice to neet you all. I am a newbie in numpy. Is there any function that could unitize a array? Thanks in advance. -- Cheers, Grissiom ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo