On Tue, Apr 12, 2011 at 13:17, Charles R Harris
wrote:
>
>
> On Tue, Apr 12, 2011 at 11:56 AM, Robert Kern wrote:
>>
>> On Tue, Apr 12, 2011 at 12:27, Charles R Harris
>> wrote:
>>
>> > IIRC, the behavior with respect to scalars sort of happened in the code
>> > on
>> > the fly, so this is a goo
On Tue, Apr 12, 2011 at 11:49, Mark Wiebe wrote:
> On Tue, Apr 12, 2011 at 9:30 AM, Robert Kern wrote:
>> You're missing the key part of the rule that numpy uses: for
>> array*scalar cases, when both array and scalar are the same kind (both
>> floating point or both integers), then the array dty
Note that hello.foo(a) returns the value of Fortran `a` value. This explains
the printed 2 value.
So, use
>>> a = hello.foo(a)
and not
>>> hello.foo(a)
As Sameer noted in previous mail, passing Python scalar values to Fortran by
reference is not
possible because Python scalars are immutable. He
bizarre
I get
=
>>> hello.foo(a)
Hello from Fortran!
a= 1
2
>>> a
1
>>> hello.foo(a)
Hello from Fortran!
a= 1
2
>>> print a
1
>>>
=
i.e. The value of 2 gets printed! This is numpy 1.3.0
-Mathew
On Tue, Apr 12, 2011 at 11:45 AM, Pearu Peterson
On Tue, Apr 12, 2011 at 11:17 AM, Charles R Harris <
charlesr.har...@gmail.com> wrote:
>
>
> On Tue, Apr 12, 2011 at 11:56 AM, Robert Kern wrote:
>
>> On Tue, Apr 12, 2011 at 12:27, Charles R Harris
>> wrote:
>>
>> > IIRC, the behavior with respect to scalars sort of happened in the code
>> on
>>
Hi
I am purely new to python and numpy.. I am using python for doing
statistical calculations to Climate data..
I have a data set in the following format..
Year Jan feb MarApr. Dec
1900 10001001 ,, ,
1901 101110
On Tue, Apr 12, 2011 at 9:06 PM, Mathew Yeates wrote:
> I have
> subroutine foo (a)
> integer a
> print*, "Hello from Fortran!"
> print*, "a=",a
> a=2
> end
>
> and from python I want to do
> >>> a=1
> >>> foo(a)
>
> and I want a's value to now be 2.
> How do I do this?
>
On 12/04/11 23:36, Mathew Yeates wrote:
> I have
> subroutine foo (a)
>integer a
>print*, "Hello from Fortran!"
>print*, "a=",a
>a=2
>end
>
> and from python I want to do
a=1
foo(a)
> and I want a's value to now be 2.
> How do I do this?
>
> Mathew
On Tue, Apr 12, 2011 at 11:56 AM, Robert Kern wrote:
> On Tue, Apr 12, 2011 at 12:27, Charles R Harris
> wrote:
>
> > IIRC, the behavior with respect to scalars sort of happened in the code
> on
> > the fly, so this is a good discussion to have. We should end up with
> > documented rules and tes
I have
subroutine foo (a)
integer a
print*, "Hello from Fortran!"
print*, "a=",a
a=2
end
and from python I want to do
>>> a=1
>>> foo(a)
and I want a's value to now be 2.
How do I do this?
Mathew
___
NumPy-Discussion maili
On Tue, Apr 12, 2011 at 12:27, Charles R Harris
wrote:
> IIRC, the behavior with respect to scalars sort of happened in the code on
> the fly, so this is a good discussion to have. We should end up with
> documented rules and tests to enforce them. I agree with Mark that the tests
> have been def
On Tue, Apr 12, 2011 at 10:20 AM, Mark Wiebe wrote:
> On Tue, Apr 12, 2011 at 8:24 AM, Robert Kern wrote:
>
>> On Mon, Apr 11, 2011 at 23:43, Mark Wiebe wrote:
>> > On Mon, Apr 11, 2011 at 8:48 PM, Travis Oliphant <
>> oliph...@enthought.com>
>> > wrote:
>>
>> >> It would be good to see a simple
On Tue, Apr 12, 2011 at 10:49 AM, Mark Wiebe wrote:
> On Tue, Apr 12, 2011 at 9:30 AM, Robert Kern wrote:
>
>> On Tue, Apr 12, 2011 at 11:20, Mark Wiebe wrote:
>> > On Tue, Apr 12, 2011 at 8:24 AM, Robert Kern
>> wrote:
>> >>
>> >> On Mon, Apr 11, 2011 at 23:43, Mark Wiebe wrote:
>> >> > On Mo
On Tue, Apr 12, 2011 at 9:17 AM, David Cournapeau wrote:
> On Tue, Apr 12, 2011 at 10:25 AM, Gabriella Turek wrote:
>>
>> Hello I'm working with cygwin 1.7.9. I've installed python 2.6 from the
>> cygwin distro. I've also installed nympy from the distro (v. 1.4.1), and
>> when that failed, I tr
On Tue, Apr 12, 2011 at 9:30 AM, Robert Kern wrote:
> On Tue, Apr 12, 2011 at 11:20, Mark Wiebe wrote:
> > On Tue, Apr 12, 2011 at 8:24 AM, Robert Kern
> wrote:
> >>
> >> On Mon, Apr 11, 2011 at 23:43, Mark Wiebe wrote:
> >> > On Mon, Apr 11, 2011 at 8:48 PM, Travis Oliphant
> >> >
> >> > wro
On Tue, Apr 12, 2011 at 11:20, Mark Wiebe wrote:
> On Tue, Apr 12, 2011 at 8:24 AM, Robert Kern wrote:
>>
>> On Mon, Apr 11, 2011 at 23:43, Mark Wiebe wrote:
>> > On Mon, Apr 11, 2011 at 8:48 PM, Travis Oliphant
>> >
>> > wrote:
>>
>> >> It would be good to see a simple test case and understand
On Tue, Apr 12, 2011 at 8:24 AM, Robert Kern wrote:
> On Mon, Apr 11, 2011 at 23:43, Mark Wiebe wrote:
> > On Mon, Apr 11, 2011 at 8:48 PM, Travis Oliphant >
> > wrote:
>
> >> It would be good to see a simple test case and understand why the
> boolean
> >> multiplied by the scalar double is bec
On Mon, Apr 11, 2011 at 23:43, Mark Wiebe wrote:
> On Mon, Apr 11, 2011 at 8:48 PM, Travis Oliphant
> wrote:
>> It would be good to see a simple test case and understand why the boolean
>> multiplied by the scalar double is becoming a float16. In other words,
>> why does
>> (1-test)*t
>> re
On 04/11/2011 05:03 PM, Keith Goodman wrote:
> On Mon, Apr 11, 2011 at 2:36 PM, Sergio Pascual
> wrote:
>> Hi list.
>>
>> For mi application, I would like to implement some new statistics
>> functions over numpy arrays, such as truncated mean. Ideally this new
>> function should have the same arg
On Tue, Apr 12, 2011 at 10:25 AM, Gabriella Turek wrote:
>
> Hello I'm working with cygwin 1.7.9. I've installed python 2.6 from the
> cygwin distro. I've also installed nympy from the distro (v. 1.4.1), and when
> that failed, I tried to installed directly form source (v. 1.5.1)
> In both cases
20 matches
Mail list logo