Geometry and Linear Algebraic Operations

https://d2l.ai/chapter_appendix-mathematics-for-deep-learning/geometry-linear-algebraic-ops.html

Please review the section 17.1.8. Determinant.
The example matrix A is different from matrix A presented in 17.1.4. Geometry of Linear Transformations.

I think columns and rows need to exchanged in 17.1.8.

Hi @mathnow, thanks for your feedback! We have corrected it at https://github.com/d2l-ai/d2l-en/pull/722.

%matplotlib inline
import d2l
from IPython import display
from mxnet import gluon, np, npx
npx.set_np()

def angle(v, w):
    return np.arccos(v.dot(w) / (np.linalg.norm(v) * np.linalg.norm(w)))

orthogonal_angle = angle(np.array([0, 1]), np.array([1, 0]))  
orthogonal_angle.asscalar()

raise bug:

Hi @chibinjiang, both of the following methods can change it to scalar:

float(orthogonal_angle)

or

orthogonal_angle.item()

@gold_piggy Appreciate

But why does .asscalar() not work???
As you see, the orthogonal_angle has the attribute of asscalar() method.

There is not attribute of asscalar in np interface. Here are all the supported functions. http://numpy.mxnet.io/api/deepnumpy/index.html