0

Let A = np.ones([3,3,5]).

Is there any linear algebra operation which will return array([[ 9., 9., 9., 9., 9.]]) without any looping?

1 Answer 1

2
A.sum(axis=(0, 1))

Call the standard sum routine with a tuple of axes to sum over.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.