找出符合条件的元素的index:
How to find the index of elements that satisfy certain conditions, at first, I think I can use a loop to realize it … but now that there exists lib … why bother to do that …
np.argwhere(x > 1)
Continue updating …
顺带带个一本很好的讲分析Neuro data的书的链接
https://www.sciencedirect.com/journal/handbook-of-behavioral-neuroscience/issues
计算矩阵的determinant:
一般是可以直接使用np.linalg.det
但是对于比较大的矩阵这个API极容易造成overflow或者underflow.
这个时候大多可以使用np.linalg.slogdet
,详细介绍参见
https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.slogdet.html