80d32c6793323bb1a1c0bb55faef8f9b5d30f62a,chemml/chem/magpie_python/vassal/geometry/Line.py,Line,distance,#Line#,178
Before Change
if l is None:
d = p - self.zero
n = np.zeros(3)
try:
n = d - np.dot(d, self.direction) * self.direction
except RuntimeWarning:
print(d, self.direction)
return norm(n)
else:
normal = np.cross(self.direction, l.direction)
n = norm(normal)
After Change
// except RuntimeWarning:
// print(d, self.direction)
// return norm(n)
with warnings.catch_warnings(record=True) as w:
// Cause all warnings to always be triggered.
warnings.simplefilter("always")
n = d - np.dot(d, self.direction) * self.direction
// print(n, norm(n))
if len(w) > 0 and issubclass(w[-1].category, RuntimeWarning):
// Todo: check w/ Ram if this is what he meant to do when catch a warning: n = np.zeros(3)
// n = np.zeros(3)
// print(d, self.direction)
pass
return norm(n)
else:
normal = np.cross(self.direction, l.direction)
n = norm(normal)
if n < sys.float_info.min:

In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 4
Instances
Project Name: hachmannlab/chemml
Commit Name: 80d32c6793323bb1a1c0bb55faef8f9b5d30f62a
Time: 2018-10-02
Author: mojtabah@buffalo.edu
File Name: chemml/chem/magpie_python/vassal/geometry/Line.py
Class Name: Line
Method Name: distance
Project Name: metagenome-atlas/atlas
Commit Name: e66f756f492ef8e6a4c398c512eba867cad2652f
Time: 2021-01-14
Author: silas.kieser@gmail.com
File Name: atlas/rules/get_fasta_of_bins.py
Class Name:
Method Name:
Project Name: openml/openml-python
Commit Name: 33c3a8101efe1cb66599831c03a6b960248a8718
Time: 2016-03-25
Author: feurerm@informatik.uni-freiburg.de
File Name: openml/datasets/functions.py
Class Name:
Method Name: _get_dataset_qualities
Project Name: pyinstaller/pyinstaller
Commit Name: 5b2327e051d5243f80b9b9f39f6800bbc8749bed
Time: 2018-09-09
Author: contact@tiger-222.fr
File Name: setup.py
Class Name:
Method Name: read
Project Name: explosion/thinc
Commit Name: 20ca9d882e448df5f1a9c5c0d74772763651826a
Time: 2020-01-04
Author: honnibal+gh@gmail.com
File Name: thinc/model.py
Class Name: Model
Method Name: use_params