I managed to open .txt files without uploading them first. The spaces in
your directory names could cause problems, but I'm guessing here. On my
mac, I did:
pathname =
'/Users/sschym/Documents/papers/WRR_budyko/data/CT45bigleafmultisoil8n_12_scl_30yr/'
data = numpy.loadtxt(pathname + 'yearly.t
On Tue, Apr 7, 2009 at 8:30 PM, hou.andrew wrote:
>
> I tried
>
> import numpy
> metdata = numpy.loadtxt('C:\Users\Andrew\Documents\BIOEN 301\Lab 1\AH
> \' + 'base.txt',dtype='S17')
> metdata.std(axis=None, dtype=None)
>
> Syntax error?
>
You must upload your data to the notebook first using
I tried
import numpy
metdata = numpy.loadtxt('C:\Users\Andrew\Documents\BIOEN 301\Lab 1\AH
\' + 'base.txt',dtype='S17')
metdata.std(axis=None, dtype=None)
Syntax error?
~Andrew
On Apr 7, 4:49 pm, William Stein wrote:
> On Tue, Apr 7, 2009 at 5:13 AM, Stan Schymanski wrote:
>
> > Dear Andrew,
On Tue, Apr 7, 2009 at 5:13 AM, Stan Schymanski wrote:
>
> Dear Andrew,
>
> Perhaps this may help:
>
> sage: import numpy
> sage: metdata = numpy.loadtxt(pathname + 'filename.txt',dtype='S17')
>
> where pathname is a text string with the path to the file and
> 'filename.txt' needs to be replaced
Dear Andrew,
Perhaps this may help:
sage: import numpy
sage: metdata = numpy.loadtxt(pathname + 'filename.txt',dtype='S17')
where pathname is a text string with the path to the file and
'filename.txt' needs to be replaced with the file name.
dtype='S17' means that you expect up to 17 characte