np.expand_dims(A, axis=0) np.argmax(E, axis=1)
np.newaxis
>> type(np.newaxis) NoneType >> np.newaxis == None True >> x = np.arange(3) >> x array([0, 1, 2]) >> x.shape (3,) >> x[:, np.newaxis] array([[0], [1], [2]])
Copyright @ 2024 梦幻济公 Powered by .NET 8.0 on Kubernetes Powered by: .Text and ASP.NET Theme by: .NET Monster