On 4. juli 2012, at 02:23, Sturla Molden wrote:
> Den 03.07.2012 20:38, skrev Casey W. Stark:
>>
>> Sturla, this is valid Fortran, but I agree it might just be a bad
>> idea. The Fortran 90/95 Explained book mentions this in the
>> allocatable dummy arguments section and has an example using a
Den 04.07.2012 01:59, skrev Sturla Molden:
> But neither was the case here. The allocatable was a dummy variable in
> a subroutine's interface, declared with intent(out). That is an error
> the compiler should trap, because it is doomed to segfault.
Ok, so the answer here seems to be:
In Fortra
Den 03.07.2012 20:38, skrev Casey W. Stark:
>
> Sturla, this is valid Fortran, but I agree it might just be a bad
> idea. The Fortran 90/95 Explained book mentions this in the
> allocatable dummy arguments section and has an example using an array
> with allocatable, intent(out) in a subrountine
Den 03.07.2012 19:24, skrev Pearu Peterson:
>
> One can have allocatable arrays in module data block, for instance, where
> they a global
In Fortran 2003 one can also have allocatable arrays as members in
derived types.
But neither was the case here. The allocatable was a dummy variable in a
su
On Mon, Jul 2, 2012 at 2:59 PM, Nathaniel Smith wrote:
> On Mon, Jul 2, 2012 at 10:06 PM, Robert Kern wrote:
>> On Mon, Jul 2, 2012 at 9:43 PM, Benjamin Root wrote:
>>>
>>> On Mon, Jul 2, 2012 at 4:34 PM, Nathaniel Smith wrote:
>>
I think this ship has sailed, but it'd be worth looking int
On Mon, Jul 2, 2012 at 6:31 PM, Travis Oliphant wrote:
> Ondrej should have time to work on this full time in the coming days.
That's great; having Ondrej on this full time will help a great deal.
> NumFocus can provide some funding needed for maintaining servers, etc, but
> keeping build bots
Hi,
Here is code example that work only with different index:
import numpy
x=numpy.zeros((5,5))
x[[0,2,4]]+=numpy.random.rand(3,5)
print x
This won't work if in the list [0,2,4], there is index duplication,
but with your new code, it will. I think it is the most used case of
advanced indexing. A
Hi all.
Thanks for the speedy responses! I'll try to respond to all...
The first idea is to split up the routine into two -- one to compute the
final size of the arrays, and the second to fill them in. I might end up
doing this, because it is simplest, but it means creating the initial
conditions
On Tue, Jul 3, 2012 at 5:20 PM, Sturla Molden wrote:
>
> As for f2py: Allocatable arrays are local variables for internal use,
> and they are not a part of the subroutine's calling interface. f2py only
> needs to know about the interface, not the local variables.
>
One can have allocatable array
On Mon, Jul 2, 2012 at 12:17 PM, Andrew Dalke wrote:
> In this email I propose a few changes which I think are minor
> and which don't really affect the external NumPy API but which
> I think could improve the "import numpy" performance by at
> least 40%.
+1 -- I think I remember that thread -- a
On Tue, Jul 3, 2012 at 10:35 AM, Thouis (Ray) Jones wrote:
> On Mon, Jul 2, 2012 at 11:52 PM, Sveinung Gundersen
> wrote:
>>
>> On 2. juli 2012, at 22.40, Nathaniel Smith wrote:
>>
>>> On Mon, Jul 2, 2012 at 6:54 PM, Sveinung Gundersen
>>> wrote:
[snip]
Your actual mem
Den 03.07.2012 11:54, skrev George Nurser:
>> module zp
>>implicit none
>>contains
>>subroutine ics(..., num_particles, particle_mass, positions, velocities)
>> use data_types, only : dp
>> implicit none
>> ... inputs ...
>> integer, intent(out) :: num_particles
>>
On 7/2/2012 7:17 PM, Casey W. Stark wrote:
Hi numpy.
Does anyone know if f2py supports allocatable arrays, allocated inside
fortran subroutines? The old f2py docs seem to indicate that the
allocatable array must be created with numpy, and dropped in the
module. Here's more background to expla
> Hi numpy.
>
> Does anyone know if f2py supports allocatable arrays, allocated inside
> fortran subroutines? The old f2py docs seem to indicate that the
> allocatable array must be created with numpy, and dropped in the module.
> Here's more background to explain...
>
> I have a fortran subroutine
Can you interface your fortran program twice?
First time return the number of particles, dimensions etc to python
python then creates work array of right size
Second interface pass work array as in/out array, dimension in fortran
argument list, to fortran
fortran copies allocatable arrays to arg
On Mon, Jul 2, 2012 at 11:52 PM, Sveinung Gundersen wrote:
>
> On 2. juli 2012, at 22.40, Nathaniel Smith wrote:
>
>> On Mon, Jul 2, 2012 at 6:54 PM, Sveinung Gundersen
>> wrote:
>>> [snip]
>>>
>>>
>>>
>>> Your actual memory usage may not have increased as much as you think,
>>> since memmap obj
16 matches
Mail list logo