[Numpy-discussion] Name of the file associated with a memmap

Robert Kern robert.kern@gmail....
Mon Apr 12 17:08:53 CDT 2010


On Mon, Apr 12, 2010 at 17:00, Brent Pedersen <bpederse@gmail.com> wrote:
> On Mon, Apr 12, 2010 at 2:46 PM, Robert Kern <robert.kern@gmail.com> wrote:
>> On Mon, Apr 12, 2010 at 16:43, Gael Varoquaux
>> <gael.varoquaux@normalesup.org> wrote:
>>> On Mon, Apr 12, 2010 at 04:39:23PM -0500, Robert Kern wrote:
>>>> > where should i write the docs? in the file itself or through the doc
>>>> > editor? also re path, since it can be a file-like, that would have to
>>>> > be something like:
>>>
>>>> > if isinstance(filename, basestring):
>>>> >    filename = os.path.abspath(filename)
>>>> > self.filename = filename
>>>
>>>> > ok with that?
>>>
>>>> In the case of file object, we should grab the filename from it.
>>>> Whether the filename argument to the constructor was a file name or a
>>>> file object, self.filename should always be the file name, IMO.
>>>
>>> +1.
>>>
>>> Once this is in, would it make it possible/desirable to have memmapped
>>> arrays pickle (I know that it would require work, I am just asking).
>>
>> You need some more information from the constructor arguments, but yes.
>
>
> anything other than offset and mode?

I think that's about it.

-- 
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


More information about the NumPy-Discussion mailing list