logo
Loading...

18 的作業 np.arctan2 用法,可以有實際應用的範例或程式碼嗎 - Cupoy

就如作業2的解答,為何光用np.arctan2 就可以切割成4個顏色?

18 的作業 np.arctan2 用法,可以有實際應用的範例或程式碼嗎

2021/02/03 下午 10:38
Python 資料視覺化工具與常見統計圖表介紹 (4/27 更新)
HHH
觀看數:189
回答數:3
收藏數:1

就如作業2的解答,為何光用np.arctan2 就可以切割成4個顏色?

回答列表

  • 2021/02/04 下午 04:11
    張維元 (WeiYuan)
    贊同數:0
    不贊同數:2
    留言數:0

    嗨,你好
    請把該附上的資訊一起貼上來,其他人哪知道解答 2 的解答長怎樣? 如果從 np.arctan2 的 [文件](https://numpy.org/doc/stable/reference/generated/numpy.arctan2.html) 來看,這邊是做三角函數的運算,把資料分成四個值。

    嗨,你好,我是維元,持續在不同的平台發表對 #資料科學、 #網頁開發 或 #軟體職涯 相關的文章。如果對於內文有疑問都歡迎與我們進一步的交流,都可以追蹤我的 Facebook技術部落格 ,也會不定時的舉辦分享活動,一起來玩玩吧 ヽ(●´∀`●)ノ 以下分享一些我近期發表跟資料科學有關的文章,歡迎大家持續追蹤: ■ 資料分析工具那麼多,該怎麼選? 🛠️
    真.資料團隊與分工
    觀察資料的 N 件事 🔖
    資料前處理必須要做的事 - 資料清理與型態調整

  • 2021/02/05 上午 00:35
    Jeffrey
    贊同數:1
    不贊同數:0
    留言數:0

    #Python3 program explaining arctan2() function import numpy as np arr1 = [-1, +1, +1, -1] arr2 = [-1, -1, +1, +1] ans = np.arctan2(arr2, arr1) * 180 / np.pi print ("x-coordinates : ", arr1) print ("y-coordinates : ", arr2) print ("\narctan2 values : \n", ans) # Python3 program showing of arctan2() function import numpy as np a = np.arctan2([0., 0., np.inf], [+0., -0., np.inf]) b = np.arctan2([1., -1.], [0., 0.]) print ("a : ", a) print ("b : ", b)

  • 2021/02/05 下午 02:04
    Yulu
    贊同數:4
    不贊同數:0
    留言數:0

    用arc tangent把Y X 轉換成0~1的浮點數 剛好這些浮點數會對應到scatter裡面的色碼錶 你可能要去了解一下三角函數才知道這在幹嘛