Skip to content

Instantly share code, notes, and snippets.

View harusametime's full-sized avatar
:octocat:
Loving Sake and coding

Masaki Samejima harusametime

:octocat:
Loving Sake and coding
View GitHub Profile
@harusametime
harusametime / error_load_npz.md
Last active July 12, 2019 09:07
npz保存時の注意

Numpyで複数のndarrayを保存するとき,npzを使うのは便利だが

import numpy as np

X = np.zeros((100,100))
y = np.zeros(10)

file_path = /home/samejima/data.npz
np.savez(file_path, x = X, y=y) 
@harusametime
harusametime / jupyter_error_jp.md
Last active November 6, 2017 08:02
Jupyter notebookをubuntuで起動してエラーが出たとき
$ jupyter notebook
...
OSError: [Errno 99] Cannot assign requested address

こういう風にいれましょう.

$ jupyter notebook --ip=127.0.0.1
@harusametime
harusametime / install_PySPQR_ja.md
Last active June 30, 2023 15:42
PySPQRのインストール

PySPQRをインストールしたい

  • ScipyにはSparse matrix向けのQR分解がありません...
  • Dense matrix向けはあります!が,todense()するとメモリで死んでしまいます.
  • SuiteSparseを使うとできるけどpythonで使えない,
  • Python wrapperのPySPQRを使う.

環境

  • Windows 10
  • Microsoft Visual Studio 14.0 (SuiteSparseのコンパイルにいる)