I wish did fix the issue. Have you tried it and timed it? On nearly every single modern machine today, there is fast hardware support for multiplication. So unless it's simple multiplication by 2, no, it will not be faster.
add/sub 1 cycle latency
mul/imul 3 cycle latency
multiplication of string [ containing integer], output also stored in string, How?
may help you . Numpy matrices are strictly 2-dimensional, while numpy arrays (ndarrays) are N-dimensional. Matrix objects are a subclass of ndarray, so they inherit all the attributes and methods of ndarrays. Ndarrays apply almost all operations elemntwise. The main advantage of numpy matrices is that they provide a convenient notation for matrix multiplication: if a and b are matrices, then a*b is their matrix product (not elementwise). The elementwise operation with np.matrix is obtained with np.multiply(a,b).