[SciPy-Dev] removing netcdf_variable from netcdf.__all__
Tue Sep 13 12:22:41 CDT 2011
On Tue, Sep 13, 2011 at 12:04 PM, Ralf Gommers
> On Tue, Sep 13, 2011 at 6:57 PM, Benjamin Root <email@example.com> wrote:
>> On Tue, Aug 30, 2011 at 11:48 AM, Ralf Gommers <
>> firstname.lastname@example.org> wrote:
>>> Question for users of scipy.io.netcdf: did you ever use netcdf_variable
>>> directly, or only via netcdf_file.createVariable? The documentation says
>>> that the latter is the only intended use, which means that this class
>>> shouldn't be in __all__. https://github.com/scipy/scipy/pull/67 removes
>>> it (and changes its __init__ in a non-backwards compatible way) - the patch
>>> looks correct but I want to double check that no one is using this class.
>> Sorry for not replying earlier (I don't regularly track this list). No, I
>> don't use netcdf_variable directly. However, would the documentation for
>> the class's other methods still show up in the main documentation if you
>> remove it from __all__?
>> It should, since the io module docstring contains:
> Netcdf (:mod:`scipy.io.netcdf`)
> .. module:: scipy.io.netcdf
> .. autosummary::
> :toctree: generated/
> netcdf_file - A file object for NetCDF data
> netcdf_variable - A data object for the netcdf module
Ok, I am fine with that. However, if we have this change in the call
signature, I would still feel better having a little note in the docstring
pointing out that change in case there was someone who was using this
I am still a little wary of how the change to the call signature of the
constructor was done. In particular, I am not exactly sure why it would
even be needed in the first place. For each NC_* type, there is only one
element size that is valid, and each dtype character code should only
correspond to a single NC_* type (and vice-versa). Why not have a dict of
character code to element size, and just let the character code determine
the item size?
Or, maybe I am misunderstanding what is going on. I will also double-check
on my 32 and 64 bit machines to make sure that everything works as expected.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-Dev