Skip to content

Commit

Permalink
__init__.py modified
Browse files Browse the repository at this point in the history
  • Loading branch information
Yueningwang committed Feb 27, 2019
1 parent c3bf978 commit a228f43
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions neuralizer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from .data_process import *
from .param_record import *
from .model_create import *
__version__ = '0.1'
8 changes: 5 additions & 3 deletions neuralizer/tests/test_data_process.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
from __future__ import absolute_import,division,print_function
import os
import pandas as pd
import numpy as np
import numpy.testing as npt
import data_process as dp

def test_read_file():
X,Y = dp.read_file('test.tsv',["A","B"],"y")
assert (X == [[0,1],[3,2],[4,3]]),"The data of predictors is loaded wrong"
assert (Y == [0,1,5]),"data of Y has problems"
npt.assert_equal(X,np.array[[0,1],[3,2],[4,3]])
npt.assert_equal(Y,np.array[0,1,5])

def test_data)info():
def test_data_info():
data = {"filename":"test.tsv","X_var":["A","B"],"Y_var":"y"}
X,Y,input_dim,output_dim = dp.data_info(data)
assert(input_dim == 2),"Dimension of input layer is not correct"
Expand Down

0 comments on commit a228f43

Please sign in to comment.