Commit f38f371c authored by Eteri's avatar Eteri

product: allow sklearn for machine learning

parent 1845dc9c
...@@ -57,6 +57,8 @@ sz = np.array([('2017-07-12T12:30:20',)], dtype=[('date', 'M8[s]')]) ...@@ -57,6 +57,8 @@ sz = np.array([('2017-07-12T12:30:20',)], dtype=[('date', 'M8[s]')])
allow_type(type(sz[0]['date'])) allow_type(type(sz[0]['date']))
allow_module('sklearn') allow_module('sklearn')
allow_module('sklearn.model_selection')
allow_module('sklearn.linear_model')
allow_module('scipy') allow_module('scipy')
allow_module('wendelin.bigarray.array_zodb') allow_module('wendelin.bigarray.array_zodb')
...@@ -76,6 +78,8 @@ allow_type(pd.Index) ...@@ -76,6 +78,8 @@ allow_type(pd.Index)
allow_type(pd.core.groupby.DataFrameGroupBy) allow_type(pd.core.groupby.DataFrameGroupBy)
allow_class(pd.DataFrame) allow_class(pd.DataFrame)
import sklearn.linear_model
allow_class(sklearn.linear_model.LinearRegression)
# Modify 'safetype' dict in full_write_guard function # Modify 'safetype' dict in full_write_guard function
# of RestrictedPython (closure) directly To allow # of RestrictedPython (closure) directly To allow
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment