You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to calculate the TE where my data is a matrix obtained from a molecular dynamics simulation. I tried following:
import pandas as pd
import seaborn
import matplotlib.pyplot as plt
from PyIF import te_compute as te
import numpy as np
X_1000 = pd.read_csv("1.csv")(6, 1).flatten() # 1.csv is my data
Y_1000 = pd.read_csv("1.csv")(6, 1).flatten()
Further, when I typed
TE = te.te_compute(X_1000, Y_1000, k=1, embedding=1, safetyCheck=True, GPU=False)
I got following message:
AssertionError Traceback (most recent call last)
in
----> 1 TE = te.te_compute(X_1000, Y_1000, k=1, embedding=1, safetyCheck=True, GPU=False)
~/opt/anaconda3/lib/python3.8/site-packages/PyIF/te_compute.py in te_compute(X, Y, k, embedding, safetyCheck, GPU)
27 assert_true(k>=1, msg="K should be greater than or equal to 1")
28 assert_true(embedding >= 1, msg='The embedding must be greater than or equal to 1')
---> 29 assert_true(type(X) == np.ndarray, msg='X should be a numpy array')
30 assert_true(type(Y) == np.ndarray, msg='Y should be a numpy array')
31 assert_true(len(X) == len(Y), msg='The length of X & Y are not equal')
~/opt/anaconda3/lib/python3.8/unittest/case.py in assertTrue(self, expr, msg)
763 if not expr:
764 msg = self._formatMessage(msg, "%s is not true" % safe_repr(expr))
--> 765 raise self.failureException(msg)
766
767 def _formatMessage(self, msg, standardMsg):
AssertionError: False is not true : X should be a numpy array
What am I missing here? What could be possible action overcoming the issues?
The text was updated successfully, but these errors were encountered:
Hi, I am trying to calculate the TE where my data is a matrix obtained from a molecular dynamics simulation. I tried following:
import pandas as pd
import seaborn
import matplotlib.pyplot as plt
from PyIF import te_compute as te
import numpy as np
X_1000 = pd.read_csv("1.csv")(6, 1).flatten() # 1.csv is my data
Y_1000 = pd.read_csv("1.csv")(6, 1).flatten()
And I got the following error message:
TypeError Traceback (most recent call last)
in
----> 1 X_1000 = pd.read_csv("1.csv")(6, 1).flatten()
2 Y_1000 = pd.read_csv("1.csv")(6, 1).flatten()
TypeError: 'DataFrame' object is not callable
Further, when I typed
TE = te.te_compute(X_1000, Y_1000, k=1, embedding=1, safetyCheck=True, GPU=False)
I got following message:
AssertionError Traceback (most recent call last)
in
----> 1 TE = te.te_compute(X_1000, Y_1000, k=1, embedding=1, safetyCheck=True, GPU=False)
~/opt/anaconda3/lib/python3.8/site-packages/PyIF/te_compute.py in te_compute(X, Y, k, embedding, safetyCheck, GPU)
27 assert_true(k>=1, msg="K should be greater than or equal to 1")
28 assert_true(embedding >= 1, msg='The embedding must be greater than or equal to 1')
---> 29 assert_true(type(X) == np.ndarray, msg='X should be a numpy array')
30 assert_true(type(Y) == np.ndarray, msg='Y should be a numpy array')
31 assert_true(len(X) == len(Y), msg='The length of X & Y are not equal')
~/opt/anaconda3/lib/python3.8/unittest/case.py in assertTrue(self, expr, msg)
763 if not expr:
764 msg = self._formatMessage(msg, "%s is not true" % safe_repr(expr))
--> 765 raise self.failureException(msg)
766
767 def _formatMessage(self, msg, standardMsg):
AssertionError: False is not true : X should be a numpy array
What am I missing here? What could be possible action overcoming the issues?
The text was updated successfully, but these errors were encountered: