Skip to content

Commit 6bcd33a

Browse files
committed
mval and mvstart in python
1 parent 01fefd0 commit 6bcd33a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

python/libsharp/libsharp.pyx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import numpy as np
2+
cimport numpy as np
23
cimport cython
34

45
__all__ = ['legendre_transform', 'legendre_roots', 'sht', 'synthesis', 'adjoint_synthesis',
@@ -230,6 +231,16 @@ cdef class alm_info:
230231
raise NotInitializedError()
231232
return sharp_alm_count(self.ainfo)
232233

234+
def mval(self):
235+
if self.ainfo == NULL:
236+
raise NotInitializedError()
237+
return np.asarray(<int[:self.ainfo.nm]> self.ainfo.mval)
238+
239+
def mvstart(self):
240+
if self.ainfo == NULL:
241+
raise NotInitializedError()
242+
return np.asarray(<long[:self.ainfo.nm]> self.ainfo.mvstart)
243+
233244
def __dealloc__(self):
234245
if self.ainfo != NULL:
235246
sharp_destroy_alm_info(self.ainfo)

0 commit comments

Comments
 (0)