Skip to content

Commit

Permalink
don't use the word "copy" in docs for fill; the point is that there is
Browse files Browse the repository at this point in the history
no copy().
  • Loading branch information
JeffBezanson committed Nov 18, 2014
1 parent 9e07edd commit d9fb7e0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4132,17 +4132,17 @@ Constructors

.. function:: fill(x, dims)

Create an array filled with copies of the value ``x``.
For e.g., ``fill(1.0, (10,10))`` returns a 10x10 array of floats, with each
element initialized to 1.0
Create an array filled with the value ``x``.
For example, ``fill(1.0, (10,10))`` returns a 10x10 array of floats, with each
element initialized to 1.0.

If ``x`` is an object reference, all elements will refer to the same object.
For e.g., ``fill(Foo(), dims)``, will return an array filled with the result of evaluating Foo() once.
``fill(Foo(), dims)`` will return an array filled with the result of evaluating ``Foo()`` once.

.. function:: fill!(A, x)

Fill the array ``A`` with copies of the value ``x``. If ``x`` is an object reference, all elements will refer to the same object.
For e.g., ``fill!(A, Foo())``, will return ``A`` filled with the result of evaluating Foo() once.
Fill array ``A`` with the value ``x``. If ``x`` is an object reference, all elements will refer to the same object.
``fill!(A, Foo())`` will return ``A`` filled with the result of evaluating ``Foo()`` once.

.. function:: reshape(A, dims)

Expand Down

2 comments on commit d9fb7e0

@amitmurthy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backported in 28e5f11

Please sign in to comment.