9b292db701a05ec2748be18d51a8bc52b98c646c,mlxtend/evaluate/decision_regions.py,,plot_decision_regions,#,15
Before Change
if isinstance(y, list):
y_ary = np.array(y)
else:
y_ary = y
for a in (X, y_ary):
if not isinstance(a, np.ndarray):
raise ValueError("%s must be a NumPy array." % a.__name__)
if ax is None:
ax = plt.gca()
if not y_ary.dtype == int:
y_ary = y_ary.astype(int)
// check if test data is provided
plot_testdata = True
if not isinstance(X_highlight, np.ndarray):
After Change
// Check types
if not isinstance(X, np.ndarray):
raise ValueError("X must be a 2D NumPy array")
if not isinstance(y, np.ndarray):
raise ValueError("y must be a 1D NumPy array")
if not np.issubdtype(y.dtype, np.integer):
raise ValueError("y must have be an integer array. "
"Try passing the array as y.astype(np.integer)")
if ax is None:
ax = plt.gca()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: rasbt/mlxtend
Commit Name: 9b292db701a05ec2748be18d51a8bc52b98c646c
Time: 2016-07-14
Author: mail@sebastianraschka.com
File Name: mlxtend/evaluate/decision_regions.py
Class Name:
Method Name: plot_decision_regions
Project Name: GoogleCloudPlatform/healthcare
Commit Name: db2a9d3a62e36db12066c980d180377fffb31fcc
Time: 2018-11-29
Author: noreply@google.com
File Name: deploy/rule_generator/rule_generator.py
Class Name:
Method Name: run
Project Name: scikit-optimize/scikit-optimize
Commit Name: 544875dd8a7fea49a86e5623d37274159b4ba7b5
Time: 2017-01-10
Author: betatim@gmail.com
File Name: skopt/optimizer/base.py
Class Name:
Method Name: base_minimize