본문 바로가기

분류 전체보기105

[flutter 에러] assets에서 이미지를 load해오지 못하는 오류 Unable to load asset: 이러면서 계속 오류가 났다. flutter: assets: - images/photo.png 이런식으로 되어있었기 때문인데 flutter: assets: - images/photo.png 이렇게 tap을 쳐서 수정하면 해결된다. 2020. 10. 13.
defaultTabController 하단에 tab bar을 defaultTabController을 통해 생성할 수 있다. home: DefaultTabController(length: 4, child: Scaffold(body: TabBarView(physics: NeverScrollableScrollPhysics(),))) length 는 tabbar의 개수이고 physics: NeverScrollableScrollPhysics 이렇게 하면 사용자들이 스크롤을 통해 옆으로 넘어갈 수 없게 한다. 2020. 10. 13.
[numpy] transpose, linalg.inv, dot import numpy as np transpose test = np.array([0,1,2],[3,4,5]) result = test.transpose() transpose 전치행렬을 구하는 함수로 행렬의 (i,j)번째 원소를 (j,i) 번째 원소로 바꿔 줍니다. test : [0,1,2] [3,4,5] result: [0,3] [1,4] [2,5] linalg.inv test = np.array([0,1],[2,3]) result = np.linalg.inv(test) 역행렬을 구할 때 사용합니다. dot test1 = np.array([0,1,2],[3,4,5]) test2 = np.array([3,4],[5,6],[7,8]) result = np.dot(test1,test2) 내적을 구할 때 사용.. 2020. 10. 4.
[numpy] array, reshape concatenate, split import numpy as np numpy 를 np 로 불러온다. array test = np.array([1,2,3],[4,5,6]) [1,2,3] [4,5,6] 형태의 행렬 만들어짐 reshape test1 = test.reshape(3,2) [1,2] [3,4] [5,6] 과 같이 바뀜 행렬의 모양을 바꿔주는 함수 concatenate test1 = np.array([[1, 2], [3, 4]]) test2 = np.array([[5, 6], [7, 8]]) result1 = numpy.concatenate((A, B), axis = 0) result2 = numpy.concatenate((A, B), axis = 1) concatenate는 두 개의 array를 합치는 함수이다. axis=0 인.. 2020. 10. 4.