Built-in Functions

NumPy has many built-in functions for mathematical operations and array manipulation. Selected ones are listed below.

Built-in Functions

.append()
Appends values to the end of an array.
.linspace()
Returns an array of evenly-spaced numbers over a given interval.
.log()
Returns an element-wise natural logarithm for an array.
.reshape()
Rearranges the data of an ndarray into a new shape.
.sum()
Sums the elements of an array over a given axis.
.transpose()
Reverses or permutes the axes of an ndarray.

Contributors

Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn Python:NumPy on Codecademy