MattShannon / bandmat

A banded matrix library for python.
Other
26 stars 9 forks source link

Complex matrices support #12

Open gslndlb opened 4 years ago

gslndlb commented 4 years ago

Hi, It appears that complex matrices are not supported. When I do the sum of two banded complex matrices, I get

Buffer dtype mismatch, expected 'float64_t' but got 'complex double'

Here is an example for this problem.

import bandmat as bm
import numpy as np

A = np.zeros((3,4), dtype='complex')
B = np.zeros((3,4), dtype='complex')
Abm = bm.BandMat(1,1, A)
Bbm = bm.BandMat(1,1, B)
Abm+Bbm