Commit b0d825fb authored by Fabrice  ALLAIN's avatar Fabrice ALLAIN
Browse files

Update aria/core/ariabase.py, aria/core/TypeChecking.py files

parent cbe7d10a
......@@ -31,6 +31,7 @@ from __future__ import absolute_import, division, print_function
import numpy
import logging
from numpy import zeros as _zeros
from collections import OrderedDict
FLOAT = 'FLOAT'
......@@ -39,6 +40,7 @@ INT = 'INT'
STRING = 'STRING'
UNICODE = 'UNICODE'
DICT = 'DICT'
ORDEREDICT = 'ORDEREDICT'
LIST = 'LIST'
TUPLE = 'TUPLE'
ARRAY = 'ARRAY'
......@@ -51,6 +53,7 @@ TYPES = {type(0.): FLOAT,
type(''): STRING,
type(u''): UNICODE,
type({}): DICT,
type(OrderedDict()): ORDEREDICT,
type([]): LIST,
type(()): TUPLE,
type(_zeros(0)): ARRAY,
......@@ -164,7 +167,7 @@ check_float = lambda x: check_type(x, FLOAT, FLOAT64)
check_string = lambda x: check_type(x, STRING, UNICODE)
check_list = lambda x: check_type(x, LIST)
check_tuple = lambda x: check_type(x, TUPLE)
check_dict = lambda x: check_type(x, DICT)
check_dict = lambda x: check_type(x, DICT, ORDEREDICT)
check_array = lambda x: check_type(x, ARRAY)
check_file = lambda x: check_type(x, 'file')
check_bool = lambda x: check_type(x, INT, BOOL)
......@@ -227,6 +227,9 @@ class AriaBaseClass:
if name is not None:
self._set_name(name)
if self.__class__.display_debug:
logging.getLogger().setLevel(logging.DEBUG)
def __getstate__(self):
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment