[SciPy-user] matrix construction

Alan G Isaac aisaac at american.edu
Mon Sep 27 13:25:46 CDT 2004


On Fri, 24 Sep 2004, Fernando Perez apparently wrote:
> dims = 4
> size = 52

> a = N.zeros((size,)*dims)
> for line in open('data'):
>      a[map(int,line.split())] += 1


This list seems to accept that nonprogrammers
are using SciPy, so hopefully my question
is not too OT:

Is the fate of the implicit file descriptor
determinate (e.g., because it was not explicitly
bound)?

This example was quite useful, btw.

Thank you,
Alan Isaac





More information about the SciPy-user mailing list