[Numpy-discussion] numpy.filled, again
Alan G Isaac
alan.isaac@gmail....
Wed Jun 12 10:30:14 CDT 2013
> Le 12/06/2013 16:18, Nathaniel Smith a écrit :
>> Now imagine a new version of this page, if we add 'filled'. There will
>> be a list at the top with functions named:
>> empty
>> filled
>> ones
>> zeros
>> It's immediately obvious what all of these things do, and how they
>> differ from each other, and in which situation you might want each,
>> just from the names, even before you read the one-line synopses. Even
>> more so if you know about the existence of np.fill(). The synopses for
>> 'ones' and 'zeros' don't even have to change, they already use the
>> word 'filled' to describe what they do. It all just works.
On 6/12/2013 10:49 AM, Pierre Haessig wrote:
> I find the "docs would look nice and consistent" argument pretty convincing.
> +1 for np.filled.
In Maple and Mathematica, these are called constant arrays.
Thus (?) another possible name is:
np.constant
Alan Isaac
PS http://reference.wolfram.com/mathematica/ref/ConstantArray.html
http://www.maplesoft.com/support/help/Maple/view.aspx?path=Student/LinearAlgebra/ConstantMatrix
More information about the NumPy-Discussion
mailing list