These are chat archives for SHTOOLS/SHTOOLS

12th
Nov 2016
Mark Wieczorek
@MarkWieczorek
Nov 12 2016 14:24
I'm wondering if we should use numpy masked arrays for the spherical harmonic coefficients in SHCoeffs. As it is now, the coeffs are stored as an array attribute with invalid elements set to zero. The class has a corresponding boolean array attribute that tells which elements are valid. Thus, we could remove the mask attribute, and replace the ndarray coeffs with a masked array. We would have to ensure that this wouldn't break anything, but I think it should be relatively straightforward to implement. What do you think?
Ilya Oshchepkov
@ioshchepkov
Nov 12 2016 14:46
Good idea, but as I know some operations with numpy masked arrays are slower than with simple arrays... Maybe it is not significant in our case. Anyway, It can be tested
Mark Wieczorek
@MarkWieczorek
Nov 12 2016 15:11
I was hoping it would be faster.....