50ad5851edd83940e72b8bbd3e8e4a6acbc7b445,mathics/builtin/image.py,BoxMatrix,apply,#BoxMatrix#Any#Any#,821
Before Change
class BoxMatrix(_ImageBuiltin):
def apply(self, r, evaluation):
"BoxMatrix[r_?RealNumberQ]"
s = 1 + 2 * r.to_python()
return from_python(skimage.morphology.rectangle(s, s).tolist())
class DiskMatrix(_ImageBuiltin):
def apply(self, r, evaluation):
After Change
class BoxMatrix(_ImageBuiltin):
def apply(self, r, evaluation):
"BoxMatrix[r_?RealNumberQ]"
py_r = abs(r.round_to_float())
s = int(math.floor(1 + 2 * py_r))
return _matrix([[Integer(1)] * s] * s)
class DiskMatrix(_ImageBuiltin):
def apply(self, r, evaluation):
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: mathics/Mathics
Commit Name: 50ad5851edd83940e72b8bbd3e8e4a6acbc7b445
Time: 2016-09-15
Author: Bernhard.Liebl@gmx.org
File Name: mathics/builtin/image.py
Class Name: BoxMatrix
Method Name: apply
Project Name: scipy/scipy
Commit Name: e9eb6182d5d3297e79b432a66a2828eb720431ca
Time: 2015-03-16
Author: argriffi@ncsu.edu
File Name: scipy/sparse/linalg/_onenormest.py
Class Name:
Method Name: sign_round_up
Project Name: geomstats/geomstats
Commit Name: 39caa436b0249d79ebec385a08b891f0c3e4edbb
Time: 2018-02-11
Author: ninamio78@gmail.com
File Name: geomstats/hyperbolic_space.py
Class Name: HyperbolicSpace
Method Name: belongs
Project Name: philipperemy/deep-speaker
Commit Name: 660aeccfe94075c71fd91fbbdcd08c87c31be1c4
Time: 2017-06-12
Author: premy@reactive.co.jp
File Name: triplet_loss.py
Class Name:
Method Name: deep_speaker_loss