プリンキピア

第2章準備

2.1.8. Exercises2.1.8 練習問題

  1. Run the code in this section. Change the conditional statement X == Y to X < Y or X > Y, and then see what kind of tensor you can get.
    英語のヒント
    この節のコードを実行せよ。条件文X == YをX < YやX > Yに変えて、どんなテンソルが得られるかを見よ。
  2. Replace the two tensors that operate by element in the broadcasting mechanism with other shapes, e.g., 3-dimensional tensors. Is the result the same as expected?
    英語のヒント
    ブロードキャストの仕組みで要素ごとに演算する二つのテンソルを、ほかの形状、たとえば3次元のテンソルに置き換えよ。結果は予想どおりか。