0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

sympy「are_similar関数 と is_similar関数 の違いを教えて下さい。」をAI先生に聞きました。

Posted at

ChatGPT先生へ

質問リスト

1. sympyのare_similar関数 と is_similar関数 の違いを教えて下さい。
2. 三角形だとどうなりますか。
3. 幾何的な「三角形」の場合 の are_similar はどうなりますか。
4. 本チャット、この会話で出てきた全ての質問を、コピーできるいつもの Markdown形式 のテキストで一覧にしてください。追番も必要です。空白行不要です。本質問も含めて。
from sympy.geometry import Point, Triangle
from sympy import are_similar  # 行列用の関数

A = Triangle(Point(0, 0), Point(2, 0), Point(0, 1))
B = Triangle(Point(0, 0), Point(4, 0), Point(0, 2))

A.is_similar(B)
# ✅ → True

are_similar(A, B)
# ❌ → AttributeError: 'Triangle' object has no attribute 'is_similar' 
#     (あるいは TypeError depending on version)

🔹 結論から言うと:
🔹 Triangle.is_similar() → ✅ 存在する(図形の相似判定に使える)
🔹are_similar() → ❌ 幾何オブジェクト(Triangleなど)には未定義

Gemini先生へ

copilot先生へ

いつもの? sympyの実行環境と 参考のおすすめです。

(テンプレート)

いつもと違うおすすめです。

sympy doc

・sympy.geometry.util.are_similar(e1, e2)
https://docs.sympy.org/latest/modules/geometry/utils.html#sympy.geometry.util.are_similar

・is_similar(other)
https://docs.sympy.org/latest/modules/geometry/entities.html#sympy.geometry.entity.GeometryEntity.is_similar

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?