Fix saving lists of arrays with recent versions of numpy
[qpms.git] / qpms / __init__.py
blobf83e93bb20f2ef27b59597895ecaae7004864b78
2 import os as __os
3 from sys import platform as __platform
5 import warnings as __warnings
7 try:
8 from .qpms_c import PointGroup, FinitePointGroup, FinitePointGroupElement, Particle, scatsystem_set_nthreads, ScatteringSystem, ScatteringMatrix, pitau, set_gsl_pythonic_error_handling, pgsl_ignore_error, gamma_inc, lll_reduce, qpms_library_version
9 except ImportError as ex:
10 if __platform == "linux" or __platform == "linux2":
11 if 'LD_LIBRARY_PATH' not in __os.environ.keys():
12 __warnings.warn("Environment variable LD_LIBRARY_PATH has not been set. Make it point to a directory where you installed libqpms and run python again")
13 else:
14 __warnings.warn("Does your LD_LIBRARY_PATH include a directory where you installed libqpms? Check and run python again."
15 '\nCurrently, I see LD_LIBRARY_PATH="%s"' % __os.environ['LD_LIBRARY_PATH'])
16 raise ex
17 from .cyquaternions import CQuat, IRot3
18 from .cybspec import VSWFNorm, BaseSpec, default_bspec
19 from .cytmatrices import CTMatrix, TMatrixInterpolator, TMatrixGenerator
20 from .cytranslations import trans_calculator
21 from .cymaterials import MaterialInterpolator, EpsMu, LorentzDrudeModel, lorentz_drude, EpsMuGenerator
22 from .cycommon import dbgmsg_enable, dbgmsg_disable, dbgmsg_active, BesselType, VSWFType
23 from .cywaves import vswf_single
25 def __version__():
26 from pkg_resources import get_distribution
27 librev = qpms_library_version()
28 return get_distribution('qpms').version + (("lr:"+librev) if librev else "")
30 #from .qpms_p import * # don't import automatically (adds around 0.5 s delay and depends on scipy)
31 from .constants import *
33 # legacy code which brutally slows down the whole package init:
34 #from .lattices2d import *
35 #from .hexpoints import *
36 #from .tmatrices import *