I have an function that maps an ndarray of shape (3) to a float, and I have an ndarray of shape (…,3). What’s the best way to map that function over that array to get an array of shape (…)?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You want
numpy.apply_along_axis.output:
array([-1.75875289, -0.34689792, 0.66092486, -0.21626001, -0.14125476])