Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread Gökhan SEVER
On Wed, Jun 10, 2009 at 12:56 AM, David Goldsmith
d_l_goldsm...@yahoo.comwrote:


 --- On Tue, 6/9/09, Gökhan SEVER gokhanse...@gmail.com wrote:

  Matthew Brett matthew.br...@gmail.com
  wrote:
 
   I am having problem while trying to memory map a
  simple file (attached as
 
   test.txt)
 
  The file looks like a text file, but memmap is for
  binary files.
 
  Could that be the problem?
 
  Matthew
 
  I don't see such a restriction in memmap function based
  on its help

 Fixed (at least in the Numpy Doc Wiki, don't know how long it will take for
 that to propagate to a release)


You mean you modified the rst documents in the numpy trunk?




  at or memmap? from IPython.

 Sorry, no authority over there.


What do you mean by this?



  I thought it will happily work with text files too :(

 Not the soln. you were hoping for, I know, sorry.


I was going to compare a script with memmap and loadtxt versions of data
loading and processing. It still works fine with loadtxt :)

gs
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread David Goldsmith

--- On Tue, 6/9/09, Gökhan SEVER gokhanse...@gmail.com wrote:
 
 You mean you modified the rst documents in the numpy
 trunk?

No, at least I don't think so, I made the modification at:

http://docs.scipy.org/numpy/docs/numpy.core.memmap.memmap/

and, IIUC, the auto-sync between the Wiki and the rst is one-way: rst changes 
automatically propagate to the Wiki, but not vice-versa; anyone, please correct 
me if I'm wrong, and if I'm right, please elaborate on precisely what has to 
happen for Wiki changes to be propagated to the rst (because I don't know).

  at or memmap? from IPython.

 Sorry, no authority over there.
 
 What do you mean by this?

Sorry again, I don't do IPython, so when I saw at or memmap? from IPython I 
thought you must be referring to IPython's independent help doc system, and, by 
extension, the people who are responsible for it.  But Robert set me straight.
 
  I thought it will happily work with text files too :(

 Not the soln. you were hoping for, I know, sorry.
 
 I was going to compare a script with memmap and loadtxt
 versions of data loading and processing. It still works fine
 with loadtxt :)

Good.

DG



  
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread Gökhan SEVER
On Wed, Jun 10, 2009 at 12:34 AM, Matthew Brett matthew.br...@gmail.comwrote:

 Hi,

  I am having problem while trying to memory map a simple file (attached as
  test.txt)

 The file looks like a text file, but memmap is for binary files.
 Could that be the problem?

 Best,

 Matthew


What's the reason again that memmap only works with binary files? Could the
functionality be extended to text files as well?

Python's mmap module support text file mapping, however I am getting another
error this time :(

In [1]: import mmap

In [2]: f = open('test.txt', 'r')

In [3]: map = mmap.mmap(f.fileno(), 0)
---
EnvironmentError  Traceback (most recent call last)

/home/gsever/Desktop/src/range_calc/ipython console in module()

EnvironmentError: [Errno 13] Permission denied


I am on a Linux machine...

gs
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread Gökhan SEVER
On Wed, Jun 10, 2009 at 1:41 AM, David Goldsmith d_l_goldsm...@yahoo.comwrote:


 --- On Tue, 6/9/09, Gökhan SEVER gokhanse...@gmail.com wrote:

  You mean you modified the rst documents in the numpy
  trunk?

 No, at least I don't think so, I made the modification at:

 http://docs.scipy.org/numpy/docs/numpy.core.memmap.memmap/

 and, IIUC, the auto-sync between the Wiki and the rst is one-way: rst
 changes automatically propagate to the Wiki, but not vice-versa; anyone,
 please correct me if I'm wrong, and if I'm right, please elaborate on
 precisely what has to happen for Wiki changes to be propagated to the rst
 (because I don't know).


I don't know that there are two way sync between the wiki and rst files. As
far as I know, fixing the rst files is the right way to go.
However, I might be wrong?
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread David Goldsmith

My present job - and the Summer Numpy Doc Marathon - is premised on making 
changes/additions through the Wiki; if anyone other than registered developers 
is to be messing w/ the rst, it's news to me.  At this point, someone who knows 
should please step in and clearly explain the relationship between the Wiki and 
the rst (or point to the place on the Wiki where this is explained).  Thanks!

DG

--- On Tue, 6/9/09, Gökhan SEVER gokhanse...@gmail.com wrote:

 From: Gökhan SEVER gokhanse...@gmail.com
 Subject: Re: [Numpy-discussion] Question about memmap
 To: Discussion of Numerical Python numpy-discussion@scipy.org
 Date: Tuesday, June 9, 2009, 11:53 PM
 On Wed, Jun
 10, 2009 at 1:41 AM, David Goldsmith d_l_goldsm...@yahoo.com
 wrote:
 
 
 
 --- On Tue, 6/9/09, Gökhan SEVER gokhanse...@gmail.com
 wrote:
 
 
 
  You mean you modified the rst
 documents in the numpy
 
  trunk?
 
 
 
 No, at least I don't think so, I made the
 modification at:
 
 
 
 http://docs.scipy.org/numpy/docs/numpy.core.memmap.memmap/
 
 
 
 and, IIUC, the auto-sync between the Wiki and
 the rst is one-way: rst changes automatically propagate to
 the Wiki, but not vice-versa; anyone, please correct me if
 I'm wrong, and if I'm right, please elaborate on
 precisely what has to happen for Wiki changes to be
 propagated to the rst (because I don't know).
 
 
 
 I don't know that there are two way sync between the
 wiki and rst files. As far as I know, fixing the rst files
 is the right way to go.
 However, I might be wrong?
 
 -Inline Attachment Follows-
 
 ___
 Numpy-discussion mailing list
 Numpy-discussion@scipy.org
 http://mail.scipy.org/mailman/listinfo/numpy-discussion
 


  
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread Pauli Virtanen
Wed, 10 Jun 2009 01:51:19 -0500, Gökhan SEVER kirjoitti:
 What's the reason again that memmap only works with binary files? 

There are no separate text files and binary files. All files are 
binary, some just contain text that in some cases represents an array of 
numbers.

Memmap views also text files as binary. It returns you an array 
representing the *character data* in the file.

 Could the functionality be extended to text files as well?

In principle, yes. But this would need special parsing of the text in the 
memmap. Doing this right would be considerably more work than just 
representing the binary data. Also, I doubt that this would be very 
useful: representing large amounts of data as text is not efficient. I 
also think few people have interest in this feature.

-- 
Pauli Virtanen

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread Gökhan SEVER
On Wed, Jun 10, 2009 at 2:03 AM, David Goldsmith d_l_goldsm...@yahoo.comwrote:


 My present job - and the Summer Numpy Doc Marathon - is premised on making
 changes/additions through the Wiki; if anyone other than registered
 developers is to be messing w/ the rst, it's news to me.  At this point,
 someone who knows should please step in and clearly explain the relationship
 between the Wiki and the rst (or point to the place on the Wiki where this
 is explained).  Thanks!

 DG


To me, docstring originated changes should be made on the actual source
codes. Since they the preliminary sources for sphinx to work on integrating
with rst documents under the /doc folder in the main numpy trunk. There is a
daily doc build system running so each change will be reflected on the next
build cycle.

Also for a developer, just doing a svn up will fetch the necessary updated
from the code-base in this case memmap.py file itself, from there on it's
optional whether to read docstings from the file itself or via IPy or in
another way. The philosophy I like in this design, a well written and
documented code doesn't need an additional documentation because everything
one needs is right in the code :)

gs
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread Robert Kern
On Wed, Jun 10, 2009 at 02:20, Gökhan SEVERgokhanse...@gmail.com wrote:
 On Wed, Jun 10, 2009 at 2:03 AM, David Goldsmith d_l_goldsm...@yahoo.com
 wrote:

 My present job - and the Summer Numpy Doc Marathon - is premised on making
 changes/additions through the Wiki; if anyone other than registered
 developers is to be messing w/ the rst, it's news to me.  At this point,
 someone who knows should please step in and clearly explain the relationship
 between the Wiki and the rst (or point to the place on the Wiki where this
 is explained).  Thanks!

 DG

 To me, docstring originated changes should be made on the actual source
 codes. Since they the preliminary sources for sphinx to work on integrating
 with rst documents under the /doc folder in the main numpy trunk. There is a
 daily doc build system running so each change will be reflected on the next
 build cycle.

The changes in the doc wiki will get pushed to the docstrings in SVN.
The Sphinx documentation for numpy.memmap is built from these
docstrings.

-- 
Robert Kern

I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
  -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread Gael Varoquaux
On Wed, Jun 10, 2009 at 02:20:00AM -0500, Gökhan SEVER wrote:
On Wed, Jun 10, 2009 at 2:03 AM, David Goldsmith
[1]d_l_goldsm...@yahoo.com wrote:

  My present job - and the Summer Numpy Doc Marathon - is premised on
  making changes/additions through the Wiki; if anyone other than
  registered developers is to be messing w/ the rst, it's news to me.  At
  this point, someone who knows should please step in and clearly explain
  the relationship between the Wiki and the rst (or point to the place on
  the Wiki where this is explained).  Thanks!

  DG

To me, docstring originated changes should be made on the actual source
codes. Since they the preliminary sources for sphinx to work on
integrating with rst documents under the /doc folder in the main numpy
trunk. There is a daily doc build system running so each change will be
reflected on the next build cycle.

Also for a developer, just doing a svn up will fetch the necessary
updated from the code-base in this case memmap.py file itself, from there
on it's optional whether to read docstings from the file itself or via IPy
or in another way. The philosophy I like in this design, a well written
and documented code doesn't need an additional documentation because
everything one needs is right in the code :)

The wiki is syncrhonised to the source. Everything that is edited in the
source ends up in the wiki, and vice versa, althought editing the same
docstring at both ends gives a conflict (which can be solved).

I tend to encourage using the wiki, because it makes it easy to document
for a non developper. Reviewing the changes is also easier.

Gaël
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread Gökhan SEVER
On Wed, Jun 10, 2009 at 2:13 AM, Pauli Virtanen p...@iki.fi wrote:

 Wed, 10 Jun 2009 01:51:19 -0500, Gökhan SEVER kirjoitti:
  What's the reason again that memmap only works with binary files?

 There are no separate text files and binary files. All files are
 binary, some just contain text that in some cases represents an array of
 numbers.

 Memmap views also text files as binary. It returns you an array
 representing the *character data* in the file.

  Could the functionality be extended to text files as well?

 In principle, yes. But this would need special parsing of the text in the
 memmap. Doing this right would be considerably more work than just
 representing the binary data. Also, I doubt that this would be very
 useful: representing large amounts of data as text is not efficient. I
 also think few people have interest in this feature.


I was expecting to see a similar result to loadtxt() function with memmap().
I just can't map the numbers in to an array but the whole file represented
as characters. Now I see why I don't see what it's actually in my test.txt
in terms of numbers.

Reading more from memmap.py, I see that it uses mmap module. Your
explanations confirm my observation that text files should also work here
--providing that missing special parsing. I don't have much idea of how to
implement this...

Gokhan
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread Scott Sinclair
 2009/6/10 David Goldsmith d_l_goldsm...@yahoo.com:

 My present job - and the Summer Numpy Doc Marathon - is premised on making 
 changes/additions through the Wiki; if anyone other than registered 
 developers is to be messing w/ the rst, it's news to me.  At this point, 
 someone who knows should please step in and clearly explain the relationship 
 between the Wiki and the rst (or point to the place on the Wiki where this is 
 explained).  Thanks!

 DG

To add to Robert's eplanation.

The front page of the Doc-Wiki says:

You do not need to be a SciPy developer to contribute, as any
documentation changes committed directly to the Subversion repository
by developers are automatically propogated here on a daily basis. This
means that you can be sure the documentation reflected here is in sync
with the most recent Scipy development efforts.

All of the documentation in the Wiki is actually stored as plain text
in rst format (this is what you see when you click on the edit link).
The files are stored in a separate subversion repository to the
official NumPy and SciPy repositories. The Doc-Wiki simply renders the
rst formatted text and provides nice functionality for editing and
navigating the documentation.

For documentation to get from the Wiki's repo to the main NumPy and
SciPy repo's someone (with commit privileges) must make a patch and
apply it. Visit http://docs.scipy.org/numpy/patch/ and generate a
patch to see what I mean.

Any changes a developer checks into the main repo's will automatically
be propogated to the Doc-Wiki repo once a day, to avoid things getting
to confused.

The upshot is, if you're a developer you can commit doc changes
directly to the main repos. If you are not you can edit the rst docs
in the Doc-Wiki and this will be committed to the main repos at some
convenient time (usually just before a release).

Cheers,
Scott
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread Robert Kern
On Wed, Jun 10, 2009 at 02:25, Gökhan SEVERgokhanse...@gmail.com wrote:
 On Wed, Jun 10, 2009 at 2:13 AM, Pauli Virtanen p...@iki.fi wrote:

 Wed, 10 Jun 2009 01:51:19 -0500, Gökhan SEVER kirjoitti:
  What's the reason again that memmap only works with binary files?

 There are no separate text files and binary files. All files are
 binary, some just contain text that in some cases represents an array of
 numbers.

 Memmap views also text files as binary. It returns you an array
 representing the *character data* in the file.

  Could the functionality be extended to text files as well?

 In principle, yes. But this would need special parsing of the text in the
 memmap. Doing this right would be considerably more work than just
 representing the binary data. Also, I doubt that this would be very
 useful: representing large amounts of data as text is not efficient. I
 also think few people have interest in this feature.

 I was expecting to see a similar result to loadtxt() function with memmap().
 I just can't map the numbers in to an array but the whole file represented
 as characters. Now I see why I don't see what it's actually in my test.txt
 in terms of numbers.

 Reading more from memmap.py, I see that it uses mmap module. Your
 explanations confirm my observation that text files should also work here
 --providing that missing special parsing. I don't have much idea of how to
 implement this...

No, numpy.memmap cannot be made to deal meaningfully with text files
(except as an array of characters, perhaps, but that's not what we're
talking about). In order to parse the text into an array of numbers,
all of the memory has to be read. The resulting floating point array
will not (and cannot) be synchronized in any way back to the text in
the file.

-- 
Robert Kern

I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
  -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread Gökhan SEVER
On Wed, Jun 10, 2009 at 2:26 AM, Scott Sinclair scott.sinclair...@gmail.com
 wrote:

  2009/6/10 David Goldsmith d_l_goldsm...@yahoo.com:
 
  My present job - and the Summer Numpy Doc Marathon - is premised on
 making changes/additions through the Wiki; if anyone other than registered
 developers is to be messing w/ the rst, it's news to me.  At this point,
 someone who knows should please step in and clearly explain the relationship
 between the Wiki and the rst (or point to the place on the Wiki where this
 is explained).  Thanks!
 
  DG

 To add to Robert's eplanation.

 The front page of the Doc-Wiki says:

 You do not need to be a SciPy developer to contribute, as any
 documentation changes committed directly to the Subversion repository
 by developers are automatically propogated here on a daily basis. This
 means that you can be sure the documentation reflected here is in sync
 with the most recent Scipy development efforts.

 All of the documentation in the Wiki is actually stored as plain text
 in rst format (this is what you see when you click on the edit link).
 The files are stored in a separate subversion repository to the
 official NumPy and SciPy repositories. The Doc-Wiki simply renders the
 rst formatted text and provides nice functionality for editing and
 navigating the documentation.

 For documentation to get from the Wiki's repo to the main NumPy and
 SciPy repo's someone (with commit privileges) must make a patch and
 apply it. Visit http://docs.scipy.org/numpy/patch/ and generate a
 patch to see what I mean.

 Any changes a developer checks into the main repo's will automatically
 be propogated to the Doc-Wiki repo once a day, to avoid things getting
 to confused.

 The upshot is, if you're a developer you can commit doc changes
 directly to the main repos. If you are not you can edit the rst docs
 in the Doc-Wiki and this will be committed to the main repos at some
 convenient time (usually just before a release).



Thanks for the clarification. It seems like the Wiki system simplifies the
documentation process way much.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread David Goldsmith

--- On Wed, 6/10/09, Gael Varoquaux gael.varoqu...@normalesup.org wrote:

 I tend to encourage using the wiki, because it makes it
 easy to document
 for a non developper. Reviewing the changes is also
 easier.

And it provides a level of protection for the source; though a late-comer to 
this system, it's wisdom is plainly apparent, at least to me.

OK, so the reconciliation is two-way, via SVN; I take it only registered 
developers have update/commit privileges?  Does at least one developer check 
SVN at least once daily?

DG



  
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread David Goldsmith

--- On Wed, 6/10/09, Scott Sinclair scott.sinclair...@gmail.com wrote:

 The front page of the Doc-Wiki says:
 
 You do not need to be a SciPy developer to contribute, as
 any
 documentation changes committed directly to the Subversion
 repository
 by developers are automatically propogated here on a daily
 basis. This
 means that you can be sure the documentation reflected here
 is in sync
 with the most recent Scipy development efforts.

Which is why I though the sync was one way.  Unfortunately, I didn't now read 
on (but, as is often the case, what follows makes much more sense now that I 
know what it means ;-) ).

DG

 All of the documentation in the Wiki is actually stored as
 plain text
 in rst format (this is what you see when you click on the
 edit link).
 The files are stored in a separate subversion repository to
 the
 official NumPy and SciPy repositories. The Doc-Wiki simply
 renders the
 rst formatted text and provides nice functionality for
 editing and
 navigating the documentation.
 
 For documentation to get from the Wiki's repo to the main
 NumPy and
 SciPy repo's someone (with commit privileges) must make a
 patch and
 apply it. Visit http://docs.scipy.org/numpy/patch/ and generate a
 patch to see what I mean.
 
 Any changes a developer checks into the main repo's will
 automatically
 be propogated to the Doc-Wiki repo once a day, to avoid
 things getting
 to confused.
 
 The upshot is, if you're a developer you can commit doc
 changes
 directly to the main repos. If you are not you can edit the
 rst docs
 in the Doc-Wiki and this will be committed to the main
 repos at some
 convenient time (usually just before a release).
 
 Cheers,
 Scott
 ___
 Numpy-discussion mailing list
 Numpy-discussion@scipy.org
 http://mail.scipy.org/mailman/listinfo/numpy-discussion
 


  
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread Gael Varoquaux
On Wed, Jun 10, 2009 at 12:36:07AM -0700, David Goldsmith wrote:
 OK, so the reconciliation is two-way, via SVN; I take it only registered 
 developers have update/commit privileges?  Does at least one developer check 
 SVN at least once daily?

The way the web application works, is that it can generate standard diffs
to SVN, using the 'patch' link, in the top bar. If you have commit rights
on numpy, you can apply them. Also, it pulls the docstrings from the svn
nightly. Any conflicts are tracked similarly to SVN, and are listed in
the 'Merge' page, where you can resolve them, as you do in SVN.

We should make you administrator of the web app fairly soon. 

Gaël
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread Scott Sinclair
 2009/6/10 David Goldsmith d_l_goldsm...@yahoo.com:

 --- On Wed, 6/10/09, Scott Sinclair scott.sinclair...@gmail.com wrote:

 The front page of the Doc-Wiki says:

 You do not need to be a SciPy developer to contribute, as
 any
 documentation changes committed directly to the Subversion
 repository
 by developers are automatically propogated here on a daily
 basis. This
 means that you can be sure the documentation reflected here
 is in sync
 with the most recent Scipy development efforts.

 Which is why I though the sync was one way.  Unfortunately, I didn't now read 
 on (but, as is often the case, what follows makes much more sense now that I 
 know what it means ;-) ).

 DG

I've modified the Introduction on the front page
http://docs.scipy.org/numpy/Front Page

Should be clear as mud now :)

Cheers,
Scott
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-10 Thread David Goldsmith

Thanks, Scott.  Clear as mud.  (Just kidding, of course.) ;-)

DG

--- On Wed, 6/10/09, Scott Sinclair scott.sinclair...@gmail.com wrote:

 From: Scott Sinclair scott.sinclair...@gmail.com
 Subject: Re: [Numpy-discussion] Question about memmap
 To: Discussion of Numerical Python numpy-discussion@scipy.org
 Date: Wednesday, June 10, 2009, 1:06 AM
  2009/6/10 David Goldsmith d_l_goldsm...@yahoo.com:
 
  --- On Wed, 6/10/09, Scott Sinclair scott.sinclair...@gmail.com
 wrote:
 
  The front page of the Doc-Wiki says:
 
  You do not need to be a SciPy developer to
 contribute, as
  any
  documentation changes committed directly to the
 Subversion
  repository
  by developers are automatically propogated here on
 a daily
  basis. This
  means that you can be sure the documentation
 reflected here
  is in sync
  with the most recent Scipy development efforts.
 
  Which is why I though the sync was one way.
  Unfortunately, I didn't now read on (but, as is often the
 case, what follows makes much more sense now that I know
 what it means ;-) ).
 
  DG
 
 I've modified the Introduction on the front page
 http://docs.scipy.org/numpy/Front Page
 
 Should be clear as mud now :)
 
 Cheers,
 Scott
 ___
 Numpy-discussion mailing list
 Numpy-discussion@scipy.org
 http://mail.scipy.org/mailman/listinfo/numpy-discussion
 


  
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Question about memmap

2009-06-09 Thread Gökhan SEVER
Hello,

I am having problem while trying to memory map a simple file (attached as
test.txt)

In IPython

data = memmap('test.txt', mode='r', dtype=double, shape=(3,5))

data

memmap([[  3.45616501e-86,   4.85780149e-33,   4.85787493e-33,
  5.07185821e-86,   4.85780159e-33],
   [  4.85787493e-33,   5.07185821e-86,   1.28444278e-57,
  1.39804066e-76,   4.85787506e-33],
   [  4.83906715e-33,   4.85784273e-33,   4.85787506e-33,
  4.83906715e-33,   4.85784273e-33]])

which is not what is in the file. Tried different dtype float options, but
always the same result.

Could you tell me what could be wrong?

Thanks...

Gökhan
  42501. 99. 99. 99. 99.
  42502. 99. 99. 99. 99.
  42503. 99. 99. 99. 99.___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-09 Thread Matthew Brett
Hi,

 I am having problem while trying to memory map a simple file (attached as
 test.txt)

The file looks like a text file, but memmap is for binary files.
Could that be the problem?

Best,

Matthew
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-09 Thread Gökhan SEVER
On Wed, Jun 10, 2009 at 12:34 AM, Matthew Brett matthew.br...@gmail.comwrote:

 Hi,

  I am having problem while trying to memory map a simple file (attached as
  test.txt)

 The file looks like a text file, but memmap is for binary files.
 Could that be the problem?

 Best,

 Matthew


I don't see such a restriction in memmap function based on its help at or
memmap? from IPython.

http://docs.scipy.org/doc/numpy/reference/generated/numpy.memmap.html#numpy.memmap

I thought it will happily work with text files too :(

Gökhan
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-09 Thread David Goldsmith

--- On Tue, 6/9/09, Gökhan SEVER gokhanse...@gmail.com wrote:

 Matthew Brett matthew.br...@gmail.com
 wrote:
 
  I am having problem while trying to memory map a
 simple file (attached as
 
  test.txt)

 The file looks like a text file, but memmap is for
 binary files.
 
 Could that be the problem?
 
 Matthew
 
 I don't see such a restriction in memmap function based
 on its help 

Fixed (at least in the Numpy Doc Wiki, don't know how long it will take for 
that to propagate to a release)

 at or memmap? from IPython.

Sorry, no authority over there.

 I thought it will happily work with text files too :(

Not the soln. you were hoping for, I know, sorry.

DG


  
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Question about memmap

2009-06-09 Thread David Goldsmith

Sorry for the double post, my link and/or browser was acting up.

DG


  
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion