網頁

2016年2月29日 星期一

Quaternion 四元數 - Create by Axis & Angle

Last Update: 2016/4/16 19:00+08
Type: Note



q = a + bi + cj + dk = a + v
讓空間表示、運算和旋轉都變簡單的東西



2016年2月9日 星期二

Python - List

Last Update: 2016/02/09 21:28+08



Intro


List 宣告方法
my_list = [0,1,2,3,4,5,6,7,8,9]

P.S. 陣列物件: numpy.array



Python - Dictionary

Last Update: 2016/02/09 20:44+08



Intro


Dictionary (字典) 宣告 axis=x, 為第 x 維度合併
dict = {"a": 1, "b": 2, "c":3}
dict = {} #可宣告空 Dictionary 



Python - Array

Last Update: 2016/02/09 17:59+08



Intro


Python 陣列的相關用法(廢話XD
a = numpy.array([0,1,2,3,4,5,6,7,8,9])

P.S. list() 物件



2016年2月8日 星期一

Python - Package, Module & Class

Last Update: 2016/02/08 21:22+08



Package, Module & Class
Python是以資料夾結構來定義程式結構
資料夾=Package (or namespace)
檔案.py=Module
在檔案裡宣告Class
from package01.package02.module01 import class01

Package(資料夾) 底下通常會有個 __init__.py 檔案
是載入Package時會執行的敍述, 一般令其為空的就可以了
Class 宣告
Class 的建構子為 __init__
必帶 self 同等 this
欄位宣告如下
class DataSet:
    def __init__(self):
        self.train = numpy.array([[]])
        self.train_taget = numpy.array([[]])
        self.test = numpy.array([])
        self.test_target = numpy.array([])