Skip to content

Commit

Permalink
Removed prov and numpy dependencies from python package. (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
javh committed Apr 25, 2018
1 parent 89c5bd1 commit a020c4e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
28 changes: 14 additions & 14 deletions lang/python/airr/schema.py
Expand Up @@ -3,7 +3,6 @@
"""

# Imports
import numpy as np
import sys
import yaml
import yamlordereddictloader
Expand Down Expand Up @@ -81,19 +80,20 @@ def type(self, field):
field_type = field_spec.get('type', None) if field_spec else None
return field_type

def numpy_types(self):
type_mapping = {}
for property in self.properties:
if self.type(property) == 'boolean':
type_mapping[property] = np.bool
elif self.type(property) == 'integer':
type_mapping[property] = np.int64
elif self.type(property) == 'number':
type_mapping[property] = np.float64
elif self.type(property) == 'string':
type_mapping[property] = np.unicode_

return type_mapping
# import numpy as np
# def numpy_types(self):
# type_mapping = {}
# for property in self.properties:
# if self.type(property) == 'boolean':
# type_mapping[property] = np.bool
# elif self.type(property) == 'integer':
# type_mapping[property] = np.int64
# elif self.type(property) == 'number':
# type_mapping[property] = np.float64
# elif self.type(property) == 'string':
# type_mapping[property] = np.unicode_
#
# return type_mapping

@staticmethod
def to_bool(value):
Expand Down
2 changes: 0 additions & 2 deletions lang/python/requirements.txt
@@ -1,6 +1,4 @@
numpy>= 1.11
pandas>= 0.18.0
prov>=1.5.1
pyyaml>=3.12
yamlordereddictloader>=0.4.0
setuptools>=2.0

0 comments on commit a020c4e

Please sign in to comment.