These are chat archives for numpy/numpy

Nov 2017
Christopher Chavez
Nov 06 2017 02:43
Hi, I'm curious why attempting to implicitly multiply a matrix with a 1-D ndarray, e.g. np.matrix([[1]]) @ np.array([1]), results in RuntimeError: Iterator automatic output has an array subtype which changed the dimensions of the output. Is this intentional (e.g. should I instead explicitly cast one operand to the other's type), or could this be a supported operation?
Nathaniel J. Smith
Nov 06 2017 03:07
@chrstphrchvz I don't know that error message, but it sounds like something is getting confused by np.matrix's weird hacks. My suggestion would be to stop using np.matrix :-). np.matrix is pretty much deprecated and we don't recommend anyone use it.
Christopher Chavez
Nov 06 2017 03:11
@njsmith Thanks, I wasn't aware of that but will keep that in mind. I guess I will stick with np.array then--I'm not stuck with np.matrix for what I'm doing