Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuizi7 committed Sep 29, 2018
2 parents 20f1ad3 + 39a2751 commit 83bb50f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions rqalpha/mod/rqalpha_mod_sys_analyser/mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import six
import os
import pickle
import numpy as np
import pandas as pd

import numbers
from collections import defaultdict
from enum import Enum

import six
import numpy as np
import pandas as pd

from rqalpha.const import EXIT_CODE, DEFAULT_ACCOUNT_TYPE
from rqalpha.events import EVENT
from rqalpha.interface import AbstractMod
Expand Down Expand Up @@ -89,8 +89,8 @@ def _safe_convert(value, ndigits=3):
if isinstance(value, Enum):
return value.name

if isinstance(value, (float, np.float64, np.float32, np.float16, np.float)):
return round(value, ndigits)
if isinstance(value, numbers.Real):
return round(float(value), ndigits)

return value

Expand Down

0 comments on commit 83bb50f

Please sign in to comment.