I seem to be running into an error in the research environment when trying to access the function for sm.distributions.empirical_distribution.ECDF.
I am able to run locally outside of your system (using python 2.7.10), so it is only an issue with the Research environment.
Is this an intended security measure or is there another way to call this function that does not run into this issue?
Thanks!
import statsmodels.api as sm
import numpy as np
import matplotlib.pyplot as plt
#Emperical Distribution Function
sample = np.random.uniform(0, 1, 50)
ecdf = sm.distributions.empirical_distribution.ECDF(sample)
x = np.linspace(min(sample), max(sample))
y = ecdf(x)
plt.step(x, y)
plt.show()
SecurityViolation Traceback (most recent call
last) in ()
1 #Emperical Distribution Function
2 sample = np.random.uniform(0, 1, 50)
----> 3 ecdf = sm.distributions.empirical_distribution.ECDF(sample)
4
5 x = np.linspace(min(sample), max(sample))/home/qexec/src/qexec_repo/qexec/algo/safety.py in
getattribute(self, attr)
137 mute_greylist=mute_greylist,
138 module=module,
--> 139 module_wrapper=self,
140 )
141 finally:/home/qexec/src/qexec_repo/qexec/algo/safety.py in
check_attribute_access(full_path, whitelist, name_blacklist,
caller_fr, module, module_wrapper, msg, mute_greylist)
87 violations=[{'message': strip_qexec_module_path(error_message),
88 'lineno': caller_fr.f_lineno,
---> 89 'extra': extra}])
90
91SecurityViolation: 0002 Security Violations(s): Accessing
sm.distributions raised an AttributeError. No attributes with a
similar name were found.