[Numpy-discussion] numpy.filled, again
Wed Jun 12 07:28:27 CDT 2013
On Wed, Jun 12, 2013 at 1:10 PM, Nathaniel Smith <email@example.com> wrote:
> Hi all,
> It looks like we've gotten a bit confused and need to untangle
> something. There's a PR to add new functions 'np.filled' and
> And there was a discussion about this on the list back in January:
> I think a reasonable summary of the opinions in the thread are:
> - This functionality is great, ...
> - ...but we can't call it 'np.filled' because there's also
> 'np.ma.filled' which does something else...
> - ...but there really aren't any better names...
> - ...so we should overload np.empty, like: 'np.empty(shape, fill=value)'
> In the mean time the original submitter has continued puttering along
> polishing the original patch, and it's ready to merge... except it's
> still the original interface, somehow the thread discussion and the PR
> discussion never met up.
:) - a temptation that is can be hard to resist.
> So, we have to decide what to do.
> Personally I think that overloading np.empty is horribly ugly, will
> continue confusing newbies and everyone else indefinitely, and I'm
> 100% convinced that we'll regret implementing such a warty interface
> for something that should be so idiomatic. (Unfortunately I got busy
> and didn't actually say this in the previous thread though.)
Maybe you could unpack this, as I seem to remember this was the option
with the most support previously.
More information about the NumPy-Discussion