project
stringlengths 1
98
| commit_sha
stringlengths 40
40
| parent_sha
stringlengths 40
40
| file_path
stringlengths 4
209
| project_url
stringlengths 23
132
| likely_bug
bool 1
class | comodified
bool 1
class | in_function
bool 2
classes | diff
stringlengths 27
9.71k
| before
stringlengths 1
8.91k
| after
stringlengths 1
6k
| sstub_pattern
stringclasses 23
values | edit_script
stringlengths 33
158k
| key
stringlengths 45
154
| commit_message
stringlengths 3
65.5k
⌀ | files
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
estate | 9e1e9b8d9ea88b917abe4e2835d6ef79daa9dda1 | bfaa383ba771ac57f3a504e3b75050fdb91f8e13 | hr_indonesia/__openerp__.py | https://github.com/sutanto62/estate | true | false | false | @@ -19,7 +19,7 @@
'version': '0.1',
# any module necessary for this one to work correctly
- 'depends': ['base','hr', 'hr_contract'],
+ 'depends': ['base', 'hr', 'hr_contract', 'hr_attendance'],
# always loaded
'data': [
| 'depends' : [ 'base' , 'hr' , 'hr_contract' ] , | 'depends' : [ 'base' , 'hr' , 'hr_contract' , 'hr_attendance' ] , | SINGLE_STMT | [["Insert", ["subscript", 3, 5, 3, 44], [",:,", "T"], 8], ["Insert", ["subscript", 3, 5, 3, 44], ["string:'hr_attendance'", "T"], 9]] | sutanto62/estate@9e1e9b8d9ea88b917abe4e2835d6ef79daa9dda1 | [FIX] hr_indonesia: required hr_attendance. | [
{
"sha": "ef37c2ba326953a38cf2363e1ca57d7e440ae2ec",
"filename": "hr_indonesia/__openerp__.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/sutanto62/estate/blob/9e1e9b8d9ea88b917abe4e2835d6ef79daa9dda1/hr_indonesia%2F__openerp__.py",
"raw_url": "https://github.com/sutanto62/estate/raw/9e1e9b8d9ea88b917abe4e2835d6ef79daa9dda1/hr_indonesia%2F__openerp__.py",
"contents_url": "https://api.github.com/repos/sutanto62/estate/contents/hr_indonesia%2F__openerp__.py?ref=9e1e9b8d9ea88b917abe4e2835d6ef79daa9dda1",
"patch": "@@ -19,7 +19,7 @@\n 'version': '0.1',\n \n # any module necessary for this one to work correctly\n- 'depends': ['base','hr', 'hr_contract'],\n+ 'depends': ['base', 'hr', 'hr_contract', 'hr_attendance'],\n \n # always loaded\n 'data': ["
}
] |
scikit-image | dd61f4830ea2d5d0c380b2a742b1e5aee24129aa | 87739ed031f7dfd322c177d55d52ce728f886a97 | skimage/measure/__init__.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -1,3 +1,3 @@
from .find_contours import find_contours
from ._regionprops import regionprops
-from ._structural_similarity import ssim
+from ._structural_similarity import structural_similarity
| from . _structural_similarity import ssim | from . _structural_similarity import structural_similarity | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:ssim", 2, 37, 2, 41], "structural_similarity"]] | matsuken92/scikit-image@dd61f4830ea2d5d0c380b2a742b1e5aee24129aa | BUG Fix invalid import of structural_similarity. | [
{
"sha": "588ec74dc9dbe0e284cd017aa25b88fe3f210c24",
"filename": "skimage/measure/__init__.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/dd61f4830ea2d5d0c380b2a742b1e5aee24129aa/skimage%2Fmeasure%2F__init__.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/dd61f4830ea2d5d0c380b2a742b1e5aee24129aa/skimage%2Fmeasure%2F__init__.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fmeasure%2F__init__.py?ref=dd61f4830ea2d5d0c380b2a742b1e5aee24129aa",
"patch": "@@ -1,3 +1,3 @@\n from .find_contours import find_contours\n from ._regionprops import regionprops\n-from ._structural_similarity import ssim\n+from ._structural_similarity import structural_similarity"
}
] |
scikit-image | ec5c339c682fb2187d77d2c35ce12cf77a95bb6e | 2a75b78838112d214a3ac44ddde49239a099d05b | skimage/transform/geometric.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -320,8 +320,8 @@ def estimate_transformation(ttype, src, dst, order=None):
ttype = ttype.lower()
if ttype not in ESTIMATED_TRANSFORMATIONS:
- raise NotImplemented('the transformation type \'%s\' is not'
- 'implemented' % ttype)
+ raise ValueError('the transformation type \'%s\' is not'
+ 'implemented' % ttype)
args = [src, dst]
if order is not None and ttype == 'polynomial':
args.append(order)
| raise NotImplemented ( 'the transformation type \'%s\' is not' 'implemented' % ttype ) | raise ValueError ( 'the transformation type \'%s\' is not' 'implemented' % ttype ) | WRONG_FUNCTION_NAME | [["Update", ["identifier:NotImplemented", 2, 15, 2, 29], "ValueError"]] | matsuken92/scikit-image@ec5c339c682fb2187d77d2c35ce12cf77a95bb6e | fix wrong exception type | [
{
"sha": "4519af889b7c0e83481c8f48e3406c3d5e60fd63",
"filename": "skimage/transform/geometric.py",
"status": "modified",
"additions": 2,
"deletions": 2,
"changes": 4,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/ec5c339c682fb2187d77d2c35ce12cf77a95bb6e/skimage%2Ftransform%2Fgeometric.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/ec5c339c682fb2187d77d2c35ce12cf77a95bb6e/skimage%2Ftransform%2Fgeometric.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ftransform%2Fgeometric.py?ref=ec5c339c682fb2187d77d2c35ce12cf77a95bb6e",
"patch": "@@ -320,8 +320,8 @@ def estimate_transformation(ttype, src, dst, order=None):\n \"\"\"\n ttype = ttype.lower()\n if ttype not in ESTIMATED_TRANSFORMATIONS:\n- raise NotImplemented('the transformation type \\'%s\\' is not'\n- 'implemented' % ttype)\n+ raise ValueError('the transformation type \\'%s\\' is not'\n+ 'implemented' % ttype)\n args = [src, dst]\n if order is not None and ttype == 'polynomial':\n args.append(order)"
}
] |
scikit-image | 89f0151a7a4329007b6ac6e93194466f779bb10f | f6066539ccd727a3b3613fbd0d0cd16c02a5dd27 | skimage/io/__init__.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -31,7 +31,7 @@ def _load_preferred_plugins():
try:
use_plugin(plugin, kind=func)
break
- except (ImportError, RuntimeError):
+ except (ImportError, RuntimeError, OSError):
pass
# Use PIL as the default imread plugin, since matplotlib (1.2.x)
| try : use_plugin ( plugin , kind = func ) break except ( ImportError , RuntimeError ) : pass | try : use_plugin ( plugin , kind = func ) break except ( ImportError , RuntimeError , OSError ) : pass | ADD_ELEMENTS_TO_ITERABLE | [["Insert", ["tuple", 3, 20, 3, 47], [",:,", "T"], 4], ["Insert", ["tuple", 3, 20, 3, 47], ["identifier:OSError", "T"], 5]] | matsuken92/scikit-image@89f0151a7a4329007b6ac6e93194466f779bb10f | BUG: Fix testing failures when FreeImage not installed.
FreeImage throws an OSError, which must be caught when attempting
to load the IO plugins for tests to pass without FreeImage installed. | [
{
"sha": "5e701a514d691f35eca395c650c18472b784798b",
"filename": "skimage/io/__init__.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/89f0151a7a4329007b6ac6e93194466f779bb10f/skimage%2Fio%2F__init__.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/89f0151a7a4329007b6ac6e93194466f779bb10f/skimage%2Fio%2F__init__.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fio%2F__init__.py?ref=89f0151a7a4329007b6ac6e93194466f779bb10f",
"patch": "@@ -31,7 +31,7 @@ def _load_preferred_plugins():\n try:\n use_plugin(plugin, kind=func)\n break\n- except (ImportError, RuntimeError):\n+ except (ImportError, RuntimeError, OSError):\n pass\n \n # Use PIL as the default imread plugin, since matplotlib (1.2.x)"
}
] |
scikit-image | 2ae4dd4551801b92b740de19f8f383022a13bf28 | be6bb0c809da448a846f6092cfc9085c74380f61 | skimage/transform/_geometric.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -339,7 +339,7 @@ class SimilarityTransform(ProjectiveTransform):
if scale is None:
- scale = (1, 1)
+ scale = 1
if rotation is None:
rotation = 0
if translation is None:
| scale = ( 1 , 1 ) | scale = 1 | SINGLE_STMT | [["Move", ["assignment", 1, 13, 1, 27], ["integer:1", 1, 22, 1, 23], 2], ["Delete", ["(:(", 1, 21, 1, 22]], ["Delete", [",:,", 1, 23, 1, 24]], ["Delete", ["integer:1", 1, 25, 1, 26]], ["Delete", ["):)", 1, 26, 1, 27]], ["Delete", ["tuple", 1, 21, 1, 27]]] | matsuken92/scikit-image@2ae4dd4551801b92b740de19f8f383022a13bf28 | fix scale initialization in implicit composition of similarity | [
{
"sha": "1058315c079814fd0344399f867f88d8f1cf3960",
"filename": "skimage/transform/_geometric.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/2ae4dd4551801b92b740de19f8f383022a13bf28/skimage%2Ftransform%2F_geometric.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/2ae4dd4551801b92b740de19f8f383022a13bf28/skimage%2Ftransform%2F_geometric.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ftransform%2F_geometric.py?ref=2ae4dd4551801b92b740de19f8f383022a13bf28",
"patch": "@@ -339,7 +339,7 @@ def compose_implicit(self, scale=None, rotation=None, translation=None):\n \n \"\"\"\n if scale is None:\n- scale = (1, 1)\n+ scale = 1\n if rotation is None:\n rotation = 0\n if translation is None:"
}
] |
scikit-image | 6410905b3b3c0a418c15e80fff6d2ce149f0c5d6 | 4d1d6a4edd7e422f43212fce8d61c51673450082 | skimage/filter/ctmf.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -13,7 +13,7 @@ Original author: Lee Kamentsky
import numpy as np
from . import _ctmf
-from .rank_order import rank_order
+from ._rank_order import rank_order
def median_filter(image, radius=2, mask=None, percent=50):
| from . rank_order import rank_order | from . _rank_order import rank_order | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:rank_order", 3, 7, 3, 17], "_rank_order"]] | matsuken92/scikit-image@6410905b3b3c0a418c15e80fff6d2ce149f0c5d6 | BUG: Fix broken import in ctmf. | [
{
"sha": "94f273e1330b78ee7a8a6ba2728e8378ad0131b4",
"filename": "skimage/filter/ctmf.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/6410905b3b3c0a418c15e80fff6d2ce149f0c5d6/skimage%2Ffilter%2Fctmf.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/6410905b3b3c0a418c15e80fff6d2ce149f0c5d6/skimage%2Ffilter%2Fctmf.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffilter%2Fctmf.py?ref=6410905b3b3c0a418c15e80fff6d2ce149f0c5d6",
"patch": "@@ -13,7 +13,7 @@\n \n import numpy as np\n from . import _ctmf\n-from .rank_order import rank_order\n+from ._rank_order import rank_order\n \n \n def median_filter(image, radius=2, mask=None, percent=50):"
}
] |
scikit-image | acc86a55084d23d7ef3c0b3b9bdf8f2b2ac38288 | 8faf1489556649728be1a58fe2c38eef373e18ae | skimage/transform/_geometric.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -710,7 +710,7 @@ def warp_coords(orows, ocols, bands, coord_transform_fn,
number of output columns
bands : int
number of color bands (aka channels)
- coord_transform_fn : callable like GeometricTransform.inverse_map
+ coord_transform_fn : callable like GeometricTransform.inverse
Return input coordinates for given output coordinates
dtype : np.dtype or string
dtype for return value (sane choices: float32 or float64)
| coord_transform_fn : callable like GeometricTransform . inverse_map | coord_transform_fn : callable like GeometricTransform . inverse | CHANGE_ATTRIBUTE_USED | [["Update", ["identifier:inverse_map", 3, 59, 3, 70], "inverse"]] | matsuken92/scikit-image@acc86a55084d23d7ef3c0b3b9bdf8f2b2ac38288 | FIX: docstring mentions inverse instead of inverse_map | [
{
"sha": "f83f65d18eff9b12500774ec491a363072e92e34",
"filename": "skimage/transform/_geometric.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/acc86a55084d23d7ef3c0b3b9bdf8f2b2ac38288/skimage%2Ftransform%2F_geometric.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/acc86a55084d23d7ef3c0b3b9bdf8f2b2ac38288/skimage%2Ftransform%2F_geometric.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ftransform%2F_geometric.py?ref=acc86a55084d23d7ef3c0b3b9bdf8f2b2ac38288",
"patch": "@@ -710,7 +710,7 @@ def warp_coords(orows, ocols, bands, coord_transform_fn,\n number of output columns\n bands : int\n number of color bands (aka channels)\n- coord_transform_fn : callable like GeometricTransform.inverse_map\n+ coord_transform_fn : callable like GeometricTransform.inverse\n Return input coordinates for given output coordinates\n dtype : np.dtype or string\n dtype for return value (sane choices: float32 or float64)"
}
] |
scikit-image | 50df20f3b71163f62423c812f8415aef49a426cb | 22a89076c26d4539f7b2947afb0fe23eb08c6bfb | skimage/measure/_polygon.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -117,7 +117,7 @@ def subdivide_polygon(coords, degree=2):
----------
coords : (N, 2) array
Coordinate array.
- method : {1, 2, 3, 4, 5, 6, 7}
+ degree : {1, 2, 3, 4, 5, 6, 7}
Degree of B-Spline. Default is 2.
Returns
| Coordinate array . method : { 1 , 2 , 3 , 4 , 5 , 6 , 7 } | Coordinate array . degree : { 1 , 2 , 3 , 4 , 5 , 6 , 7 } | CHANGE_ATTRIBUTE_USED | [["Update", ["identifier:method", 3, 5, 3, 11], "degree"]] | matsuken92/scikit-image@50df20f3b71163f62423c812f8415aef49a426cb | fix wrong parameter name in doc string | [
{
"sha": "07af5f586c946c15fd7c7cc1213a772fd6737a52",
"filename": "skimage/measure/_polygon.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/50df20f3b71163f62423c812f8415aef49a426cb/skimage%2Fmeasure%2F_polygon.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/50df20f3b71163f62423c812f8415aef49a426cb/skimage%2Fmeasure%2F_polygon.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fmeasure%2F_polygon.py?ref=50df20f3b71163f62423c812f8415aef49a426cb",
"patch": "@@ -117,7 +117,7 @@ def subdivide_polygon(coords, degree=2):\n ----------\n coords : (N, 2) array\n Coordinate array.\n- method : {1, 2, 3, 4, 5, 6, 7}\n+ degree : {1, 2, 3, 4, 5, 6, 7}\n Degree of B-Spline. Default is 2.\n \n Returns"
}
] |
scikit-image | 0460479574ba07ee34c6d51d224566dc1bc3ff76 | eccc41907135cf81b99c4be18a480a9bc705485d | skimage/feature/_greycomatrix.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -5,7 +5,7 @@ properties to characterize image textures.
import numpy as np
-from ._greycomatrix_cy import _glcm_loop
+from ._texture import _glcm_loop
def greycomatrix(image, distances, angles, levels=256, symmetric=False,
| from . _greycomatrix_cy import _glcm_loop | from . _texture import _glcm_loop | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:_greycomatrix_cy", 3, 7, 3, 23], "_texture"]] | matsuken92/scikit-image@0460479574ba07ee34c6d51d224566dc1bc3ff76 | [BUG] fixing import problem | [
{
"sha": "45476d3305f39bc7cc91fff071d99150aeb2ae32",
"filename": "skimage/feature/_greycomatrix.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/0460479574ba07ee34c6d51d224566dc1bc3ff76/skimage%2Ffeature%2F_greycomatrix.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/0460479574ba07ee34c6d51d224566dc1bc3ff76/skimage%2Ffeature%2F_greycomatrix.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffeature%2F_greycomatrix.py?ref=0460479574ba07ee34c6d51d224566dc1bc3ff76",
"patch": "@@ -5,7 +5,7 @@\n \n import numpy as np\n \n-from ._greycomatrix_cy import _glcm_loop\n+from ._texture import _glcm_loop\n \n \n def greycomatrix(image, distances, angles, levels=256, symmetric=False,"
}
] |
scikit-image | 2c0ff0543c8d2d169262afc80b88ea8abb91096f | 2c84a2135f8d3c566c9b9970544794e52262fb48 | skimage/viewer/viewers/core.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -126,7 +126,7 @@ class ImageViewer(QtGui.QMainWindow):
for p in self.plugins:
p.show()
super(ImageViewer, self).show()
- sys.exit(qApp.exec_())
+ qApp.exec_()
def redraw(self):
self.canvas.draw_idle()
| sys . exit ( qApp . exec_ ( ) ) | qApp . exec_ ( ) | SINGLE_STMT | [["Delete", ["identifier:sys", 3, 9, 3, 12]], ["Delete", [".:.", 3, 12, 3, 13]], ["Delete", ["identifier:exit", 3, 13, 3, 17]], ["Delete", ["attribute", 3, 9, 3, 17]], ["Delete", ["(:(", 3, 17, 3, 18]], ["Delete", ["):)", 3, 30, 3, 31]], ["Delete", ["argument_list", 3, 17, 3, 31]]] | matsuken92/scikit-image@2c0ff0543c8d2d169262afc80b88ea8abb91096f | BUG: Closing ImageViewer shouldn't quit parent program | [
{
"sha": "1d7d3c3dc16edf5289c2a17643c7e0ed11989db0",
"filename": "skimage/viewer/viewers/core.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/2c0ff0543c8d2d169262afc80b88ea8abb91096f/skimage%2Fviewer%2Fviewers%2Fcore.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/2c0ff0543c8d2d169262afc80b88ea8abb91096f/skimage%2Fviewer%2Fviewers%2Fcore.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fviewer%2Fviewers%2Fcore.py?ref=2c0ff0543c8d2d169262afc80b88ea8abb91096f",
"patch": "@@ -126,7 +126,7 @@ def show(self):\n for p in self.plugins:\n p.show()\n super(ImageViewer, self).show()\n- sys.exit(qApp.exec_())\n+ qApp.exec_()\n \n def redraw(self):\n self.canvas.draw_idle()"
}
] |
scikit-image | 69207c003b1270e900acc248cc4aa740f121d080 | e350db23a2c91c008f2193193fd43d5a4a2cfc75 | skimage/morphology/greyreconstruct.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -11,7 +11,7 @@ Original author: Lee Kamentsky
import numpy as np
-from skimage.filter.rank_order import rank_order
+from skimage.filter._rank_order import rank_order
def reconstruction(seed, mask, method='dilation', selem=None, offset=None):
| from skimage . filter . rank_order import rank_order | from skimage . filter . _rank_order import rank_order | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:rank_order", 2, 21, 2, 31], "_rank_order"]] | matsuken92/scikit-image@69207c003b1270e900acc248cc4aa740f121d080 | BUG: fix import of rank_order | [
{
"sha": "bf3caffef82db0da693dd63bc9be8ded63781d8e",
"filename": "skimage/morphology/greyreconstruct.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/69207c003b1270e900acc248cc4aa740f121d080/skimage%2Fmorphology%2Fgreyreconstruct.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/69207c003b1270e900acc248cc4aa740f121d080/skimage%2Fmorphology%2Fgreyreconstruct.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fmorphology%2Fgreyreconstruct.py?ref=69207c003b1270e900acc248cc4aa740f121d080",
"patch": "@@ -11,7 +11,7 @@\n \"\"\"\n import numpy as np\n \n-from skimage.filter.rank_order import rank_order\n+from skimage.filter._rank_order import rank_order\n \n \n def reconstruction(seed, mask, method='dilation', selem=None, offset=None):"
}
] |
scikit-image | 8084faf1f69c2c4ba79b6e85c7a2a06e1e7c77b8 | 24ef77ed3ebfe324219b4da29520d6c250d8aa8d | skimage/morphology/greyreconstruct.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -133,7 +133,7 @@ def reconstruction(seed, mask, method='dilation', selem=None, offset=None):
if offset == None:
if not all([d % 2 == 1 for d in selem.shape]):
ValueError("Footprint dimensions must all be odd")
- offset = np.array([d / 2 for d in selem.shape])
+ offset = np.array([d // 2 for d in selem.shape])
# Cross out the center of the selem
selem[[slice(d, d + 1) for d in offset]] = False
| offset = np . array ( [ d / 2 for d in selem . shape ] ) | offset = np . array ( [ d // 2 for d in selem . shape ] ) | CHANGE_BINARY_OPERATOR | [["Insert", ["binary_operator", 3, 28, 3, 33], ["//://", "T"], 1], ["Delete", ["/:/", 3, 30, 3, 31]]] | matsuken92/scikit-image@8084faf1f69c2c4ba79b6e85c7a2a06e1e7c77b8 | BUG: Fix division error for Python 3 | [
{
"sha": "9e447800d30f9549466eb9c8f628a5c0124ea194",
"filename": "skimage/morphology/greyreconstruct.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/8084faf1f69c2c4ba79b6e85c7a2a06e1e7c77b8/skimage%2Fmorphology%2Fgreyreconstruct.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/8084faf1f69c2c4ba79b6e85c7a2a06e1e7c77b8/skimage%2Fmorphology%2Fgreyreconstruct.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fmorphology%2Fgreyreconstruct.py?ref=8084faf1f69c2c4ba79b6e85c7a2a06e1e7c77b8",
"patch": "@@ -133,7 +133,7 @@ def reconstruction(seed, mask, method='dilation', selem=None, offset=None):\n if offset == None:\n if not all([d % 2 == 1 for d in selem.shape]):\n ValueError(\"Footprint dimensions must all be odd\")\n- offset = np.array([d / 2 for d in selem.shape])\n+ offset = np.array([d // 2 for d in selem.shape])\n # Cross out the center of the selem\n selem[[slice(d, d + 1) for d in offset]] = False\n "
}
] |
scikit-image | cfea01b9fffba5f1b217bdae92865102373e6d65 | a6532a8dae3f7e4a211a8f5825a4110f0cf5dfd0 | skimage/transform/tests/test_geometric.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -1,7 +1,7 @@
import numpy as np
from numpy.testing import assert_equal, assert_array_almost_equal
-from skimage.transform._geometric import _stackcopy
+from skimage.transform._warps import _stackcopy
from skimage.transform import (estimate_transform, SimilarityTransform,
AffineTransform, ProjectiveTransform,
PolynomialTransform)
| from skimage . transform . _geometric import _stackcopy | from skimage . transform . _warps import _stackcopy | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:_geometric", 3, 24, 3, 34], "_warps"]] | matsuken92/scikit-image@cfea01b9fffba5f1b217bdae92865102373e6d65 | Fix import error in geometric test cases | [
{
"sha": "f035631d2921104d9cda99560c6ef6ce3fa306fb",
"filename": "skimage/transform/tests/test_geometric.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/cfea01b9fffba5f1b217bdae92865102373e6d65/skimage%2Ftransform%2Ftests%2Ftest_geometric.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/cfea01b9fffba5f1b217bdae92865102373e6d65/skimage%2Ftransform%2Ftests%2Ftest_geometric.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ftransform%2Ftests%2Ftest_geometric.py?ref=cfea01b9fffba5f1b217bdae92865102373e6d65",
"patch": "@@ -1,7 +1,7 @@\n import numpy as np\n from numpy.testing import assert_equal, assert_array_almost_equal\n \n-from skimage.transform._geometric import _stackcopy\n+from skimage.transform._warps import _stackcopy\n from skimage.transform import (estimate_transform, SimilarityTransform,\n AffineTransform, ProjectiveTransform,\n PolynomialTransform)"
}
] |
scikit-image | 6ec4c21cf7af09401aabadff79898fe783efe9bd | 6f4c2ad2681e4c9b917a26dbe4305a4ef5ceedf6 | skimage/transform/__init__.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -5,4 +5,4 @@ from .integral import *
from ._geometric import (estimate_transform,
SimilarityTransform, AffineTransform,
ProjectiveTransform, PolynomialTransform)
-from ._warps import warp, warp_coords, swirl, homography
+from ._warps import warp, warp_coords, rotate, swirl, homography
| from . _warps import warp , warp_coords , swirl , homography | from . _warps import warp , warp_coords , rotate , swirl , homography | SINGLE_STMT | [["Insert", ["import_from_statement", 3, 1, 3, 57], ["dotted_name", "N0"], 7], ["Insert", ["import_from_statement", 3, 1, 3, 57], [",:,", "T"], 8], ["Insert", "N0", ["identifier:rotate", "T"], 0]] | matsuken92/scikit-image@6ec4c21cf7af09401aabadff79898fe783efe9bd | Fix import of rotate function | [
{
"sha": "1ee519f28181165e60286be0d0b666272b1e48f1",
"filename": "skimage/transform/__init__.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/6ec4c21cf7af09401aabadff79898fe783efe9bd/skimage%2Ftransform%2F__init__.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/6ec4c21cf7af09401aabadff79898fe783efe9bd/skimage%2Ftransform%2F__init__.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ftransform%2F__init__.py?ref=6ec4c21cf7af09401aabadff79898fe783efe9bd",
"patch": "@@ -5,4 +5,4 @@\n from ._geometric import (estimate_transform,\n SimilarityTransform, AffineTransform,\n ProjectiveTransform, PolynomialTransform)\n-from ._warps import warp, warp_coords, swirl, homography\n+from ._warps import warp, warp_coords, rotate, swirl, homography"
}
] |
scikit-image | 7bbb0aaa6337f1305a389b82ee613de4bab8ab24 | 571151958f94842c642f0a17b73968757326e672 | skimage/feature/_harris.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -105,5 +105,5 @@ def harris(image, min_distance=10, threshold=0.1, eps=1e-6,
harrisim = _compute_harris_response(image, eps=eps,
gaussian_deviation=gaussian_deviation)
coordinates = peak.peak_local_max(harrisim, min_distance=min_distance,
- threshold=threshold)
+ threshold_rel=threshold)
return coordinates
| coordinates = peak . peak_local_max ( harrisim , min_distance = min_distance , threshold = threshold ) | coordinates = peak . peak_local_max ( harrisim , min_distance = min_distance , threshold_rel = threshold ) | CHANGE_KEYWORD_ARGUMENT_USED | [["Update", ["identifier:threshold", 3, 41, 3, 50], "threshold_rel"]] | matsuken92/scikit-image@7bbb0aaa6337f1305a389b82ee613de4bab8ab24 | Fixed deprecated threshold. | [
{
"sha": "8ab40b22c72a1e374d302d35c045f85aa391fec0",
"filename": "skimage/feature/_harris.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/7bbb0aaa6337f1305a389b82ee613de4bab8ab24/skimage%2Ffeature%2F_harris.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/7bbb0aaa6337f1305a389b82ee613de4bab8ab24/skimage%2Ffeature%2F_harris.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffeature%2F_harris.py?ref=7bbb0aaa6337f1305a389b82ee613de4bab8ab24",
"patch": "@@ -105,5 +105,5 @@ def harris(image, min_distance=10, threshold=0.1, eps=1e-6,\n harrisim = _compute_harris_response(image, eps=eps,\n gaussian_deviation=gaussian_deviation)\n coordinates = peak.peak_local_max(harrisim, min_distance=min_distance,\n- threshold=threshold)\n+ threshold_rel=threshold)\n return coordinates"
}
] |
scikit-image | dd45f15ced95ed43b889f464b4116bb8f4124d99 | bbeaec6b3faebc0c3308423303228e6c6b8a7259 | skimage/segmentation/_clear_border.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -46,7 +46,7 @@ def clear_border(image, buffer_size=0, bgval=0):
raise ValueError("buffer size may not be greater than image size")
# create borders with buffer_size
- borders = np.zeros_like(image, np.bool_)
+ borders = np.zeros_like(image, dtype=np.bool_)
ext = buffer_size + 1
borders[:ext] = True
borders[- ext:] = True
| borders = np . zeros_like ( image , np . bool_ ) | borders = np . zeros_like ( image , dtype = np . bool_ ) | SINGLE_STMT | [["Insert", ["argument_list", 3, 28, 3, 45], ["keyword_argument", "N0"], 3], ["Insert", "N0", ["identifier:dtype", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Move", "N0", ["attribute", 3, 36, 3, 44], 2]] | matsuken92/scikit-image@dd45f15ced95ed43b889f464b4116bb8f4124d99 | Use explicit keyword for dtype | [
{
"sha": "266e17e25f4d3a630b61c3b2d596ed54f38ab328",
"filename": "skimage/segmentation/_clear_border.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/dd45f15ced95ed43b889f464b4116bb8f4124d99/skimage%2Fsegmentation%2F_clear_border.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/dd45f15ced95ed43b889f464b4116bb8f4124d99/skimage%2Fsegmentation%2F_clear_border.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fsegmentation%2F_clear_border.py?ref=dd45f15ced95ed43b889f464b4116bb8f4124d99",
"patch": "@@ -46,7 +46,7 @@ def clear_border(image, buffer_size=0, bgval=0):\n raise ValueError(\"buffer size may not be greater than image size\")\n \n # create borders with buffer_size\n- borders = np.zeros_like(image, np.bool_)\n+ borders = np.zeros_like(image, dtype=np.bool_)\n ext = buffer_size + 1\n borders[:ext] = True\n borders[- ext:] = True"
}
] |
scikit-image | 0db48936804e78b5a3f63658955a6ade395ca502 | aa08e8a559113cdb281d045a83ed400d00a86953 | doc/examples/plot_skeleton.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -16,7 +16,7 @@ In the case of boolean, 'True' indicates foreground, and for integer arrays,
from skimage.morphology import skeletonize
-from skimage.draw import draw
+from skimage import draw
import numpy as np
import matplotlib.pyplot as plt
| from skimage . draw import draw | from skimage import draw | SINGLE_STMT | [["Delete", [".:.", 1, 13, 1, 14]], ["Delete", ["identifier:draw", 1, 14, 1, 18]]] | matsuken92/scikit-image@0db48936804e78b5a3f63658955a6ade395ca502 | DOC: Fix broken doc build due to broken import | [
{
"sha": "65a0ee4897b14f2c498b908ed4f93b765bbf9a96",
"filename": "doc/examples/plot_skeleton.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/0db48936804e78b5a3f63658955a6ade395ca502/doc%2Fexamples%2Fplot_skeleton.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/0db48936804e78b5a3f63658955a6ade395ca502/doc%2Fexamples%2Fplot_skeleton.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/doc%2Fexamples%2Fplot_skeleton.py?ref=0db48936804e78b5a3f63658955a6ade395ca502",
"patch": "@@ -16,7 +16,7 @@\n the foreground is 1's.\n \"\"\"\n from skimage.morphology import skeletonize\n-from skimage.draw import draw\n+from skimage import draw\n import numpy as np\n import matplotlib.pyplot as plt\n "
}
] |
scikit-image | 1d91ed98ff71d8948e30f193074e32fd5026601c | bfa6f05e1fa17283fbb6ed375c0ae5a4a46d4e98 | skimage/util/dtype.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -344,7 +344,7 @@ def img_as_bool(image, force_copy=False):
Returns
-------
- out : ndarray of bool (bool_)
+ out : ndarray of bool (`bool_`)
Output image.
Notes
| - - - - - - - out : ndarray of bool ( bool_ ) | - - - - - - - out : ndarray of bool ( `bool_` ) | SINGLE_TOKEN | [["Insert", ["argument_list", 3, 27, 3, 34], ["string:`bool_`", "T"], 1], ["Delete", ["identifier:bool_", 3, 28, 3, 33]]] | matsuken92/scikit-image@1d91ed98ff71d8948e30f193074e32fd5026601c | DOC: Fix Sphinx warning.
Trailing underscores are used to mark links. Wrap in name in backticks to prevent Sphinx for confusing this as a link. | [
{
"sha": "0ca3197b8e77b2f63138622c0b907e105fe9c2d4",
"filename": "skimage/util/dtype.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/1d91ed98ff71d8948e30f193074e32fd5026601c/skimage%2Futil%2Fdtype.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/1d91ed98ff71d8948e30f193074e32fd5026601c/skimage%2Futil%2Fdtype.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Futil%2Fdtype.py?ref=1d91ed98ff71d8948e30f193074e32fd5026601c",
"patch": "@@ -344,7 +344,7 @@ def img_as_bool(image, force_copy=False):\n \n Returns\n -------\n- out : ndarray of bool (bool_)\n+ out : ndarray of bool (`bool_`)\n Output image.\n \n Notes"
}
] |
scikit-image | 8494a1888266bd23b03aead8db7521f9f4d20263 | 56b4ba67e617117b88d8a9b75535e5957995bbc4 | skimage/util/dtype.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -155,7 +155,7 @@ def convert(image, dtype, force_copy=False, uniform=False):
if kind_in in "fi":
sign_loss()
prec_loss()
- return image > dtype_in(0)
+ return image > dtype_in(dtype_range[dtype_in][1] / 2)
if kind_in == 'b':
# from binary image, to float and to integer
| return image > dtype_in ( 0 ) | return image > dtype_in ( dtype_range [ dtype_in ] [ 1 ] / 2 ) | SINGLE_STMT | [["Insert", ["argument_list", 3, 32, 3, 35], ["binary_operator", "N0"], 1], ["Insert", "N0", ["subscript", "N1"], 0], ["Insert", "N0", ["/:/", "T"], 1], ["Insert", "N0", ["integer:2", "T"], 2], ["Insert", "N1", ["subscript", "N2"], 0], ["Insert", "N1", ["[:[", "T"], 1], ["Insert", "N1", ["integer:1", "T"], 2], ["Insert", "N1", ["]:]", "T"], 3], ["Insert", "N2", ["identifier:dtype_range", "T"], 0], ["Insert", "N2", ["[:[", "T"], 1], ["Insert", "N2", ["identifier:dtype_in", "T"], 2], ["Insert", "N2", ["]:]", "T"], 3], ["Delete", ["integer:0", 3, 33, 3, 34]]] | matsuken92/scikit-image@8494a1888266bd23b03aead8db7521f9f4d20263 | Conversion to bool: threshold on half dtype max. | [
{
"sha": "eef7f478b30420e4385d4e45691d68e672b086a0",
"filename": "skimage/util/dtype.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/8494a1888266bd23b03aead8db7521f9f4d20263/skimage%2Futil%2Fdtype.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/8494a1888266bd23b03aead8db7521f9f4d20263/skimage%2Futil%2Fdtype.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Futil%2Fdtype.py?ref=8494a1888266bd23b03aead8db7521f9f4d20263",
"patch": "@@ -155,7 +155,7 @@ def _scale(a, n, m, copy=True):\n if kind_in in \"fi\":\n sign_loss()\n prec_loss()\n- return image > dtype_in(0)\n+ return image > dtype_in(dtype_range[dtype_in][1] / 2)\n \n if kind_in == 'b':\n # from binary image, to float and to integer"
}
] |
scikit-image | bfcc144699573c131e5554a75e0e497299ed71ae | 6d884906572b277202f439f161a94e6b3f4f1ba6 | doc/examples/plot_pyramid.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -3,7 +3,7 @@
Build image pyramids
====================
-The `build_gauassian_pyramid` function takes an image and yields successive
+The `build_gaussian_pyramid` function takes an image and yields successive
images shrunk by a constant scale factor. Image pyramids are often used, e.g.,
to implement algorithms for denoising, texture discrimination, and scale-
invariant detection.
| `build_gauassian_pyramid` function takes an image and yields successive | `build_gaussian_pyramid` function takes an image and yields successive | CHANGE_BINARY_OPERAND | [["Update", ["string:`build_gauassian_pyramid`", 3, 5, 3, 30], "`build_gaussian_pyramid`"]] | matsuken92/scikit-image@bfcc144699573c131e5554a75e0e497299ed71ae | Fix typo | [
{
"sha": "8752af686fcdf9b3ce70d093b5c9f70226d3347b",
"filename": "doc/examples/plot_pyramid.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/bfcc144699573c131e5554a75e0e497299ed71ae/doc%2Fexamples%2Fplot_pyramid.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/bfcc144699573c131e5554a75e0e497299ed71ae/doc%2Fexamples%2Fplot_pyramid.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/doc%2Fexamples%2Fplot_pyramid.py?ref=bfcc144699573c131e5554a75e0e497299ed71ae",
"patch": "@@ -3,7 +3,7 @@\n Build image pyramids\n ====================\n \n-The `build_gauassian_pyramid` function takes an image and yields successive\n+The `build_gaussian_pyramid` function takes an image and yields successive\n images shrunk by a constant scale factor. Image pyramids are often used, e.g.,\n to implement algorithms for denoising, texture discrimination, and scale-\n invariant detection."
}
] |
scikit-image | 0477c9dfebfd76b5ca9bcc15c7d2c83865c8b909 | bca85444392eb0341280fd68271b8509632ceea7 | skimage/io/tests/test_pil.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -85,7 +85,7 @@ def test_repr_png():
original_img = imread(img_path)
original_img_str = original_img._repr_png_()
- with NamedTemporaryFile(suffix='.png', mode='r+') as temp_png:
+ with NamedTemporaryFile(suffix='.png') as temp_png:
temp_png.write(original_img_str)
temp_png.seek(0)
round_trip = imread(temp_png)
| with NamedTemporaryFile ( suffix = '.png' , mode = 'r+' ) as temp_png : temp_png . write ( original_img_str ) temp_png . seek ( 0 ) round_trip = imread ( temp_png ) | with NamedTemporaryFile ( suffix = '.png' ) as temp_png : temp_png . write ( original_img_str ) temp_png . seek ( 0 ) round_trip = imread ( temp_png ) | SAME_FUNCTION_LESS_ARGS | [["Delete", [",:,", 3, 42, 3, 43]], ["Delete", ["identifier:mode", 3, 44, 3, 48]], ["Delete", ["=:=", 3, 48, 3, 49]], ["Delete", ["string:'r+'", 3, 49, 3, 53]], ["Delete", ["keyword_argument", 3, 44, 3, 53]]] | matsuken92/scikit-image@0477c9dfebfd76b5ca9bcc15c7d2c83865c8b909 | Open image files in default binary write mode
Fixes test failure on Windows | [
{
"sha": "a9d986d6365893dcc78672779795fc7ed7c8d6a6",
"filename": "skimage/io/tests/test_pil.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/0477c9dfebfd76b5ca9bcc15c7d2c83865c8b909/skimage%2Fio%2Ftests%2Ftest_pil.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/0477c9dfebfd76b5ca9bcc15c7d2c83865c8b909/skimage%2Fio%2Ftests%2Ftest_pil.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fio%2Ftests%2Ftest_pil.py?ref=0477c9dfebfd76b5ca9bcc15c7d2c83865c8b909",
"patch": "@@ -85,7 +85,7 @@ def test_repr_png():\n original_img = imread(img_path)\n original_img_str = original_img._repr_png_()\n \n- with NamedTemporaryFile(suffix='.png', mode='r+') as temp_png:\n+ with NamedTemporaryFile(suffix='.png') as temp_png:\n temp_png.write(original_img_str)\n temp_png.seek(0)\n round_trip = imread(temp_png)"
}
] |
scikit-image | dab831b72b59498de1cd2e30755f41d009826f50 | 7f1b9ea4c6f9f5ac1c0bff2d4d73aa0dd2387759 | skimage/color/colorconv.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -739,7 +739,7 @@ def xyz2lab(xyz):
a = 500.0 * (x - y)
b = 200.0 * (y - z)
- return np.concatenate(map(lambda x: x[..., np.newaxis], [L, a, b]), -1)
+ return np.concatenate([x[..., np.newaxis] for x in [L, a, b]], axis=-1)
def lab2xyz(lab):
| return np . concatenate ( map ( lambda x : x [ ... , np . newaxis ] , [ L , a , b ] ) , - 1 ) | return np . concatenate ( [ x [ ... , np . newaxis ] for x in [ L , a , b ] ] , axis = - 1 ) | SINGLE_STMT | [["Move", ["return_statement", 3, 5, 3, 76], ["call", 3, 27, 3, 71], 1], ["Move", ["call", 3, 27, 3, 71], ["attribute", 3, 12, 3, 26], 0], ["Insert", ["argument_list", 3, 30, 3, 71], ["list_comprehension", "N0"], 1], ["Move", ["argument_list", 3, 30, 3, 71], [",:,", 3, 71, 3, 72], 2], ["Insert", ["argument_list", 3, 30, 3, 71], ["keyword_argument", "N1"], 3], ["Insert", "N0", ["[:[", "T"], 0], ["Move", "N0", ["subscript", 3, 41, 3, 59], 1], ["Insert", "N0", ["for_in_clause", "N2"], 2], ["Insert", "N0", ["]:]", "T"], 3], ["Insert", "N1", ["identifier:axis", "T"], 0], ["Insert", "N1", ["=:=", "T"], 1], ["Move", "N1", ["unary_operator", 3, 73, 3, 75], 2], ["Insert", "N2", ["for:for", "T"], 0], ["Insert", "N2", ["identifier:x", "T"], 1], ["Insert", "N2", ["in:in", "T"], 2], ["Move", "N2", ["list", 3, 61, 3, 70], 3], ["Delete", ["(:(", 3, 26, 3, 27]], ["Delete", ["identifier:map", 3, 27, 3, 30]], ["Delete", ["lambda:lambda", 3, 31, 3, 37]], ["Delete", ["identifier:x", 3, 38, 3, 39]], ["Delete", ["lambda_parameters", 3, 38, 3, 39]], ["Delete", [":::", 3, 39, 3, 40]], ["Delete", ["lambda", 3, 31, 3, 59]], ["Delete", [",:,", 3, 59, 3, 60]], ["Delete", ["):)", 3, 75, 3, 76]], ["Delete", ["argument_list", 3, 26, 3, 76]], ["Delete", ["call", 3, 12, 3, 76]]] | matsuken92/scikit-image@dab831b72b59498de1cd2e30755f41d009826f50 | Bug fix: map returns iterator in Py3k | [
{
"sha": "d2b20316f1af7d26d800242a85594c4b949e3260",
"filename": "skimage/color/colorconv.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/dab831b72b59498de1cd2e30755f41d009826f50/skimage%2Fcolor%2Fcolorconv.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/dab831b72b59498de1cd2e30755f41d009826f50/skimage%2Fcolor%2Fcolorconv.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fcolor%2Fcolorconv.py?ref=dab831b72b59498de1cd2e30755f41d009826f50",
"patch": "@@ -739,7 +739,7 @@ def xyz2lab(xyz):\n a = 500.0 * (x - y)\n b = 200.0 * (y - z)\n \n- return np.concatenate(map(lambda x: x[..., np.newaxis], [L, a, b]), -1)\n+ return np.concatenate([x[..., np.newaxis] for x in [L, a, b]], axis=-1)\n \n \n def lab2xyz(lab):"
}
] |
scikit-image | 89c9b6161d67204966b6946993d688ab7ce2ff7e | 8c4b31e28c85d2719aff7cf7dfa801e464d2f3f9 | doc/examples/plot_ransac.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -21,7 +21,7 @@ y = 0.2 * x + 20
data = np.column_stack([x, y])
# add faulty data
-faulty = np.array(30 * [(180, -100)])
+faulty = np.array(30 * [(180., -100)])
faulty += 5 * np.random.normal(size=faulty.shape)
data[:faulty.shape[0]] = faulty
| faulty = np . array ( 30 * [ ( 180 , - 100 ) ] ) | faulty = np . array ( 30 * [ ( 180. , - 100 ) ] ) | CHANGE_CONSTANT_TYPE | [["Insert", ["tuple", 3, 25, 3, 36], ["float:180.", "T"], 1], ["Delete", ["integer:180", 3, 26, 3, 29]]] | matsuken92/scikit-image@89c9b6161d67204966b6946993d688ab7ce2ff7e | Fix casting in ransac example. | [
{
"sha": "2de76619414bce0cb3092cd9f03940e98fe5799d",
"filename": "doc/examples/plot_ransac.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/89c9b6161d67204966b6946993d688ab7ce2ff7e/doc%2Fexamples%2Fplot_ransac.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/89c9b6161d67204966b6946993d688ab7ce2ff7e/doc%2Fexamples%2Fplot_ransac.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/doc%2Fexamples%2Fplot_ransac.py?ref=89c9b6161d67204966b6946993d688ab7ce2ff7e",
"patch": "@@ -21,7 +21,7 @@\n data = np.column_stack([x, y])\n \n # add faulty data\n-faulty = np.array(30 * [(180, -100)])\n+faulty = np.array(30 * [(180., -100)])\n faulty += 5 * np.random.normal(size=faulty.shape)\n data[:faulty.shape[0]] = faulty\n "
}
] |
scikit-image | 8736a6650462dbeca176c19364917ce89a870ae2 | 858f7411d722dc2ccf08f794e2b3bb0b2dcd35b0 | skimage/color/tests/test_colorconv.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -52,7 +52,7 @@ def test_guess_spatial_dimensions():
assert_equal(guess_spatial_dimensions(im2), 3)
assert_equal(guess_spatial_dimensions(im3), None)
assert_equal(guess_spatial_dimensions(im4), 3)
- assert_raises(guess_spatial_dimensions(im5), ValueError)
+ assert_raises(ValueError, guess_spatial_dimensions, im5)
class TestColorconv(TestCase):
| assert_raises ( guess_spatial_dimensions ( im5 ) , ValueError ) | assert_raises ( ValueError , guess_spatial_dimensions , im5 ) | SINGLE_STMT | [["Move", [",:,", 3, 48, 3, 49], ["argument_list", 3, 18, 3, 61], 3], ["Insert", ["argument_list", 3, 18, 3, 61], [",:,", "T"], 3], ["Move", ["argument_list", 3, 18, 3, 61], ["identifier:guess_spatial_dimensions", 3, 19, 3, 43], 4], ["Move", ["argument_list", 3, 18, 3, 61], ["identifier:im5", 3, 44, 3, 47], 3], ["Delete", ["(:(", 3, 43, 3, 44]], ["Delete", ["):)", 3, 47, 3, 48]], ["Delete", ["argument_list", 3, 43, 3, 48]], ["Delete", ["call", 3, 19, 3, 48]]] | matsuken92/scikit-image@8736a6650462dbeca176c19364917ce89a870ae2 | Fix typo using assert_raises in test_colorconv.py | [
{
"sha": "4fdaa4c80a3713357acef57f89a5d28e39e49cea",
"filename": "skimage/color/tests/test_colorconv.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/8736a6650462dbeca176c19364917ce89a870ae2/skimage%2Fcolor%2Ftests%2Ftest_colorconv.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/8736a6650462dbeca176c19364917ce89a870ae2/skimage%2Fcolor%2Ftests%2Ftest_colorconv.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fcolor%2Ftests%2Ftest_colorconv.py?ref=8736a6650462dbeca176c19364917ce89a870ae2",
"patch": "@@ -52,7 +52,7 @@ def test_guess_spatial_dimensions():\n assert_equal(guess_spatial_dimensions(im2), 3)\n assert_equal(guess_spatial_dimensions(im3), None)\n assert_equal(guess_spatial_dimensions(im4), 3)\n- assert_raises(guess_spatial_dimensions(im5), ValueError)\n+ assert_raises(ValueError, guess_spatial_dimensions, im5)\n \n \n class TestColorconv(TestCase):"
}
] |
scikit-image | 35a65aeef34192b644c9a3afaa13060dee3be0ad | 2d33bf7622ca1f5ed5cebdfaf7f27919ffbf850d | skimage/util/tests/test_montage.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -58,7 +58,7 @@ def test_grid_shape():
height, width = 2, 2
arr_in = np.arange(n_images * height * width, dtype=np.float32)
arr_in = arr_in.reshape(n_images, height, width)
- arr_out = montage.montage2d(arr_in, grid_shape=(3,2))
+ arr_out = montage2d(arr_in, grid_shape=(3,2))
correct_arr_out = np.array(
[[ 0., 1., 4., 5.],
[ 2., 3., 6., 7.],
| arr_out = montage . montage2d ( arr_in , grid_shape = ( 3 , 2 ) ) | arr_out = montage2d ( arr_in , grid_shape = ( 3 , 2 ) ) | SINGLE_STMT | [["Move", ["call", 3, 15, 3, 58], ["identifier:montage2d", 3, 23, 3, 32], 0], ["Delete", ["identifier:montage", 3, 15, 3, 22]], ["Delete", [".:.", 3, 22, 3, 23]], ["Delete", ["attribute", 3, 15, 3, 32]]] | matsuken92/scikit-image@35a65aeef34192b644c9a3afaa13060dee3be0ad | Resolved faulty montage2d import. | [
{
"sha": "450ab0d2c9aac2946b52509b28ccc827ffbb4683",
"filename": "skimage/util/tests/test_montage.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/35a65aeef34192b644c9a3afaa13060dee3be0ad/skimage%2Futil%2Ftests%2Ftest_montage.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/35a65aeef34192b644c9a3afaa13060dee3be0ad/skimage%2Futil%2Ftests%2Ftest_montage.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Futil%2Ftests%2Ftest_montage.py?ref=35a65aeef34192b644c9a3afaa13060dee3be0ad",
"patch": "@@ -58,7 +58,7 @@ def test_grid_shape():\n height, width = 2, 2\n arr_in = np.arange(n_images * height * width, dtype=np.float32)\n arr_in = arr_in.reshape(n_images, height, width)\n- arr_out = montage.montage2d(arr_in, grid_shape=(3,2))\n+ arr_out = montage2d(arr_in, grid_shape=(3,2))\n correct_arr_out = np.array(\n \t[[ 0., 1., 4., 5.],\n \t [ 2., 3., 6., 7.],"
}
] |
scikit-image | 4fd18d43003839f798037c1921497cc9a0c2984f | 65d655e3ecdd20636bc093ec83268e1178f4c95c | skimage/color/tests/test_dE.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -62,7 +62,7 @@ def load_ciede2000_data():
]
# note: ciede_test_data.txt contains several intermediate quantities
- path = pjoin(dirname(abspath(__file__)), 'ciede_test_data.txt')
+ path = pjoin(dirname(abspath(__file__)), 'ciede2000_test_data.txt')
return np.loadtxt(path, dtype=dtype)
| path = pjoin ( dirname ( abspath ( __file__ ) ) , 'ciede_test_data.txt' ) | path = pjoin ( dirname ( abspath ( __file__ ) ) , 'ciede2000_test_data.txt' ) | CHANGE_STRING_LITERAL | [["Update", ["string:'ciede_test_data.txt'", 3, 46, 3, 67], "'ciede2000_test_data.txt'"]] | matsuken92/scikit-image@4fd18d43003839f798037c1921497cc9a0c2984f | fix path | [
{
"sha": "52e12724bf2ccf5667418ffa20166d76baef8e05",
"filename": "skimage/color/tests/test_dE.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/4fd18d43003839f798037c1921497cc9a0c2984f/skimage%2Fcolor%2Ftests%2Ftest_dE.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/4fd18d43003839f798037c1921497cc9a0c2984f/skimage%2Fcolor%2Ftests%2Ftest_dE.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fcolor%2Ftests%2Ftest_dE.py?ref=4fd18d43003839f798037c1921497cc9a0c2984f",
"patch": "@@ -62,7 +62,7 @@ def load_ciede2000_data():\n ]\n \n # note: ciede_test_data.txt contains several intermediate quantities\n- path = pjoin(dirname(abspath(__file__)), 'ciede_test_data.txt')\n+ path = pjoin(dirname(abspath(__file__)), 'ciede2000_test_data.txt')\n return np.loadtxt(path, dtype=dtype)\n \n "
}
] |
scikit-image | 5f46fd01be76ac8c7252ab35ba58609e81ad0ca0 | bea9aa4414d923431cc1b3c3cc14d35a4321e55f | skimage/feature/censure.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -124,7 +124,7 @@ def _star_filter_kernel(m, n):
def _suppress_lines(feature_mask, image, sigma, line_threshold):
Axx, Axy, Ayy = _compute_auto_correlation(image, sigma)
feature_mask[(Axx + Ayy) * (Axx + Ayy)
- < line_threshold * (Axx * Ayy - Axy * Axy)] = 0
+ > line_threshold * (Axx * Ayy - Axy * Axy)] = 0
return feature_mask
| feature_mask [ ( Axx + Ayy ) * ( Axx + Ayy ) < line_threshold * ( Axx * Ayy - Axy * Axy ) ] = 0 | feature_mask [ ( Axx + Ayy ) * ( Axx + Ayy ) > line_threshold * ( Axx * Ayy - Axy * Axy ) ] = 0 | CHANGE_BINARY_OPERATOR | [["Insert", ["comparison_operator", 2, 18, 3, 60], [">:>", "T"], 1], ["Delete", ["<:<", 3, 18, 3, 19]]] | matsuken92/scikit-image@5f46fd01be76ac8c7252ab35ba58609e81ad0ca0 | Correcting a bug in Line Suppression | [
{
"sha": "726af80d459e13c4110b631ad4994ce1a24a769c",
"filename": "skimage/feature/censure.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/5f46fd01be76ac8c7252ab35ba58609e81ad0ca0/skimage%2Ffeature%2Fcensure.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/5f46fd01be76ac8c7252ab35ba58609e81ad0ca0/skimage%2Ffeature%2Fcensure.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffeature%2Fcensure.py?ref=5f46fd01be76ac8c7252ab35ba58609e81ad0ca0",
"patch": "@@ -124,7 +124,7 @@ def _star_filter_kernel(m, n):\n def _suppress_lines(feature_mask, image, sigma, line_threshold):\n Axx, Axy, Ayy = _compute_auto_correlation(image, sigma)\n feature_mask[(Axx + Ayy) * (Axx + Ayy)\n- < line_threshold * (Axx * Ayy - Axy * Axy)] = 0\n+ > line_threshold * (Axx * Ayy - Axy * Axy)] = 0\n return feature_mask\n \n "
}
] |
scikit-image | 600305eb856c4e9cf25fe130e39a5eb59caca728 | b6f72c606dbe4d747fb214ec41a2060690def360 | skimage/color/delta_e.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -312,7 +312,7 @@ def get_dH2(lab1, lab2):
Despite its name "dH" is not a simple difference of hue values. We avoid
- working directly with the hue value directly since differencing angles is
+ working directly with the hue value since differencing angles is
troublesome. The hue term is usually written as:
c1 = sqrt(a1**2 + b1**2)
c2 = sqrt(a2**2 + b2**2)
| with the hue value directly since differencing angles is troublesome . The hue term is usually written as : c1 = sqrt ( a1 ** 2 + b1 ** 2 ) c2 = sqrt ( a2 ** 2 + b2 ** 2 ) | with the hue value since differencing angles is troublesome . The hue term is usually written as : c1 = sqrt ( a1 ** 2 + b1 ** 2 ) c2 = sqrt ( a2 ** 2 + b2 ** 2 ) | SINGLE_STMT | [["Delete", ["identifier:directly", 2, 41, 2, 49]]] | matsuken92/scikit-image@600305eb856c4e9cf25fe130e39a5eb59caca728 | doc quickfix | [
{
"sha": "ea08e13f1d70a8e57be676f1106f62d38979d343",
"filename": "skimage/color/delta_e.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/600305eb856c4e9cf25fe130e39a5eb59caca728/skimage%2Fcolor%2Fdelta_e.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/600305eb856c4e9cf25fe130e39a5eb59caca728/skimage%2Fcolor%2Fdelta_e.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fcolor%2Fdelta_e.py?ref=600305eb856c4e9cf25fe130e39a5eb59caca728",
"patch": "@@ -312,7 +312,7 @@ def get_dH2(lab1, lab2):\n \"\"\"squared hue difference term occurring in deltaE_cmc and deltaE_ciede94\n \n Despite its name \"dH\" is not a simple difference of hue values. We avoid\n- working directly with the hue value directly since differencing angles is\n+ working directly with the hue value since differencing angles is\n troublesome. The hue term is usually written as:\n c1 = sqrt(a1**2 + b1**2)\n c2 = sqrt(a2**2 + b2**2)"
}
] |
scikit-image | c8c95c0e633680e56c553a2c0ad9bf4ac3ee1538 | 04804cc81ccc390e7e64e9a1fe3b214f11151d0d | skimage/filter/thresholding.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -1,4 +1,4 @@
-__all__ = ['threshold_otsu', 'threshold_adaptive', 'threshold_yen']
+__all__ = ['threshold_adaptive', 'threshold_otsu', 'threshold_yen']
import numpy as np
import scipy.ndimage
| __all__ = [ 'threshold_otsu' , 'threshold_adaptive' , 'threshold_yen' ] | __all__ = [ 'threshold_adaptive' , 'threshold_otsu' , 'threshold_yen' ] | SINGLE_STMT | [["Move", ["string:'threshold_otsu'", 0, 12, 0, 28], ["list", 0, 11, 0, 68], 3], ["Move", [",:,", 0, 28, 0, 29], ["list", 0, 11, 0, 68], 4]] | matsuken92/scikit-image@c8c95c0e633680e56c553a2c0ad9bf4ac3ee1538 | Fix import list sequence | [
{
"sha": "bc052d8ac4db6b8d98306653da393ccb1ea4a654",
"filename": "skimage/filter/thresholding.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/c8c95c0e633680e56c553a2c0ad9bf4ac3ee1538/skimage%2Ffilter%2Fthresholding.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/c8c95c0e633680e56c553a2c0ad9bf4ac3ee1538/skimage%2Ffilter%2Fthresholding.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffilter%2Fthresholding.py?ref=c8c95c0e633680e56c553a2c0ad9bf4ac3ee1538",
"patch": "@@ -1,4 +1,4 @@\n-__all__ = ['threshold_otsu', 'threshold_adaptive', 'threshold_yen']\n+__all__ = ['threshold_adaptive', 'threshold_otsu', 'threshold_yen'] \n \n import numpy as np\n import scipy.ndimage"
}
] |
scikit-image | 05aaeef5ac71d14f4d54eef2d9b8f5fb3c445346 | 22ca0ae45729af1bb4a6bfe261f758b408aa46ce | skimage/segmentation/slic_superpixels.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -10,7 +10,7 @@ from skimage.segmentation._slic import _slic_cython
from skimage.color import rgb2lab
-def slic(image, n_segments=100, compactness=10., max_iter=20, sigma=1,
+def slic(image, n_segments=100, compactness=10., max_iter=20, sigma=0,
multichannel=True, convert2lab=True, ratio=None):
| def slic ( image , n_segments = 100 , compactness = 10. , max_iter = 20 , sigma = 1 , multichannel = True , convert2lab = True , ratio = None ) : | def slic ( image , n_segments = 100 , compactness = 10. , max_iter = 20 , sigma = 0 , multichannel = True , convert2lab = True , ratio = None ) : | CHANGE_NUMERIC_LITERAL | [["Update", ["integer:1", 3, 69, 3, 70], "0"]] | matsuken92/scikit-image@05aaeef5ac71d14f4d54eef2d9b8f5fb3c445346 | Change default value of sigma | [
{
"sha": "4c4a7921fdee20dcb9a82e588b9800553967a251",
"filename": "skimage/segmentation/slic_superpixels.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/05aaeef5ac71d14f4d54eef2d9b8f5fb3c445346/skimage%2Fsegmentation%2Fslic_superpixels.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/05aaeef5ac71d14f4d54eef2d9b8f5fb3c445346/skimage%2Fsegmentation%2Fslic_superpixels.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fsegmentation%2Fslic_superpixels.py?ref=05aaeef5ac71d14f4d54eef2d9b8f5fb3c445346",
"patch": "@@ -10,7 +10,7 @@\n from skimage.color import rgb2lab\n \n \n-def slic(image, n_segments=100, compactness=10., max_iter=20, sigma=1,\n+def slic(image, n_segments=100, compactness=10., max_iter=20, sigma=0,\n multichannel=True, convert2lab=True, ratio=None):\n \"\"\"Segments image using k-means clustering in Color-(x,y,z) space.\n "
}
] |
scikit-image | bc2f23d1a8d3798c64753ed1e6a01505361b750a | 05aaeef5ac71d14f4d54eef2d9b8f5fb3c445346 | skimage/segmentation/slic_superpixels.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -10,7 +10,7 @@ from skimage.segmentation._slic import _slic_cython
from skimage.color import rgb2lab
-def slic(image, n_segments=100, compactness=10., max_iter=20, sigma=0,
+def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=0,
multichannel=True, convert2lab=True, ratio=None):
| def slic ( image , n_segments = 100 , compactness = 10. , max_iter = 20 , sigma = 0 , multichannel = True , convert2lab = True , ratio = None ) : | def slic ( image , n_segments = 100 , compactness = 10. , max_iter = 10 , sigma = 0 , multichannel = True , convert2lab = True , ratio = None ) : | CHANGE_NUMERIC_LITERAL | [["Update", ["integer:20", 3, 59, 3, 61], "10"]] | matsuken92/scikit-image@bc2f23d1a8d3798c64753ed1e6a01505361b750a | Revert default value of maximum iterations | [
{
"sha": "2b2d844149b1105eacf4460f9dc0240e19b83169",
"filename": "skimage/segmentation/slic_superpixels.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/bc2f23d1a8d3798c64753ed1e6a01505361b750a/skimage%2Fsegmentation%2Fslic_superpixels.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/bc2f23d1a8d3798c64753ed1e6a01505361b750a/skimage%2Fsegmentation%2Fslic_superpixels.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fsegmentation%2Fslic_superpixels.py?ref=bc2f23d1a8d3798c64753ed1e6a01505361b750a",
"patch": "@@ -10,7 +10,7 @@\n from skimage.color import rgb2lab\n \n \n-def slic(image, n_segments=100, compactness=10., max_iter=20, sigma=0,\n+def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=0,\n multichannel=True, convert2lab=True, ratio=None):\n \"\"\"Segments image using k-means clustering in Color-(x,y,z) space.\n "
}
] |
scikit-image | 05fbc3fbfcc00157841c18b15b171d6477bfb5da | 00e5ff263bc1f32b41f02f9ca8dbafbb05459668 | skimage/segmentation/slic_superpixels.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -119,7 +119,7 @@ def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=None,
spacing = np.array(spacing, np.double)
if not isinstance(sigma, coll.Iterable):
sigma = np.array([sigma, sigma, sigma], np.double)
- elif isinstance(spacing, (list, tuple)):
+ elif isinstance(sigma, (list, tuple)):
sigma = np.array(sigma, np.double)
if (sigma > 0).any():
sigma /= spacing.astype(np.double)
| if not isinstance ( sigma , coll . Iterable ) : sigma = np . array ( [ sigma , sigma , sigma ] , np . double ) elif isinstance ( spacing , ( list , tuple ) ) : sigma = np . array ( sigma , np . double ) | if not isinstance ( sigma , coll . Iterable ) : sigma = np . array ( [ sigma , sigma , sigma ] , np . double ) elif isinstance ( sigma , ( list , tuple ) ) : sigma = np . array ( sigma , np . double ) | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:spacing", 3, 21, 3, 28], "sigma"]] | matsuken92/scikit-image@05fbc3fbfcc00157841c18b15b171d6477bfb5da | Bug fix: typo: wrote spacing instead of sigma | [
{
"sha": "422dff988d951294636bc01acb982f17c46bee93",
"filename": "skimage/segmentation/slic_superpixels.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/05fbc3fbfcc00157841c18b15b171d6477bfb5da/skimage%2Fsegmentation%2Fslic_superpixels.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/05fbc3fbfcc00157841c18b15b171d6477bfb5da/skimage%2Fsegmentation%2Fslic_superpixels.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fsegmentation%2Fslic_superpixels.py?ref=05fbc3fbfcc00157841c18b15b171d6477bfb5da",
"patch": "@@ -119,7 +119,7 @@ def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=None,\n spacing = np.array(spacing, np.double)\n if not isinstance(sigma, coll.Iterable):\n sigma = np.array([sigma, sigma, sigma], np.double)\n- elif isinstance(spacing, (list, tuple)):\n+ elif isinstance(sigma, (list, tuple)):\n sigma = np.array(sigma, np.double)\n if (sigma > 0).any():\n sigma /= spacing.astype(np.double)"
}
] |
scikit-image | 0ed1e22034d6665890b482db1ede65ed4401d678 | 8d0f91724fc85f5d505b0088f9010738cbb97b22 | skimage/transform/_geometric.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -515,7 +515,7 @@ class SimilarityTransform(ProjectiveTransform):
[math.sin(rotation), math.cos(rotation), 0],
[ 0, 0, 1]
])
- self._matrix *= scale
+ self._matrix[0:2, 0:2] *= scale
self._matrix[0:2, 2] = translation
else:
# default to an identity transform
| self . _matrix *= scale | self . _matrix [ 0 : 2 , 0 : 2 ] *= scale | SINGLE_STMT | [["Insert", ["augmented_assignment", 3, 13, 3, 34], ["subscript", "N0"], 0], ["Move", "N0", ["attribute", 3, 13, 3, 25], 0], ["Insert", "N0", ["[:[", "T"], 1], ["Insert", "N0", ["slice", "N1"], 2], ["Insert", "N0", [",:,", "T"], 3], ["Insert", "N0", ["slice", "N2"], 4], ["Insert", "N0", ["]:]", "T"], 5], ["Insert", "N1", ["integer:0", "T"], 0], ["Insert", "N1", [":::", "T"], 1], ["Insert", "N1", ["integer:2", "T"], 2], ["Insert", "N2", ["integer:0", "T"], 0], ["Insert", "N2", [":::", "T"], 1], ["Insert", "N2", ["integer:2", "T"], 2]] | matsuken92/scikit-image@0ed1e22034d6665890b482db1ede65ed4401d678 | Correcting bug in SimialarityTransform | [
{
"sha": "6117008a827ec90028f34bff9d7fe00602c899a7",
"filename": "skimage/transform/_geometric.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/0ed1e22034d6665890b482db1ede65ed4401d678/skimage%2Ftransform%2F_geometric.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/0ed1e22034d6665890b482db1ede65ed4401d678/skimage%2Ftransform%2F_geometric.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ftransform%2F_geometric.py?ref=0ed1e22034d6665890b482db1ede65ed4401d678",
"patch": "@@ -515,7 +515,7 @@ def __init__(self, matrix=None, scale=None, rotation=None,\n [math.sin(rotation), math.cos(rotation), 0],\n [ 0, 0, 1]\n ])\n- self._matrix *= scale\n+ self._matrix[0:2, 0:2] *= scale\n self._matrix[0:2, 2] = translation\n else:\n # default to an identity transform"
}
] |
scikit-image | 78a849cc37258dcee85d24e31eb9dea2a9851b7a | d7824000fe92f50b565a9c6a7d49006814101ac0 | skimage/measure/_regionprops.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -524,7 +524,7 @@ def perimeter(image, neighbourhood=4):
eroded_image = ndimage.binary_erosion(image, strel, border_value=0)
border_image = image - eroded_image
- perimeter_weights = np.zeros(50, dtype=np.float32)
+ perimeter_weights = np.zeros(50, dtype=np.double)
perimeter_weights[[5, 7, 15, 17, 25, 27]] = 1
perimeter_weights[[21, 33]] = sqrt(2)
perimeter_weights[[13, 23]] = (1 + sqrt(2)) / 2
| perimeter_weights = np . zeros ( 50 , dtype = np . float32 ) | perimeter_weights = np . zeros ( 50 , dtype = np . double ) | CHANGE_ATTRIBUTE_USED | [["Update", ["identifier:float32", 3, 47, 3, 54], "double"]] | matsuken92/scikit-image@78a849cc37258dcee85d24e31eb9dea2a9851b7a | Fix dtype bug in perimeter | [
{
"sha": "9078df6f40bf72655a9969f3ba2f35d571702e15",
"filename": "skimage/measure/_regionprops.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/78a849cc37258dcee85d24e31eb9dea2a9851b7a/skimage%2Fmeasure%2F_regionprops.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/78a849cc37258dcee85d24e31eb9dea2a9851b7a/skimage%2Fmeasure%2F_regionprops.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fmeasure%2F_regionprops.py?ref=78a849cc37258dcee85d24e31eb9dea2a9851b7a",
"patch": "@@ -524,7 +524,7 @@ def perimeter(image, neighbourhood=4):\n eroded_image = ndimage.binary_erosion(image, strel, border_value=0)\n border_image = image - eroded_image\n \n- perimeter_weights = np.zeros(50, dtype=np.float32)\n+ perimeter_weights = np.zeros(50, dtype=np.double)\n perimeter_weights[[5, 7, 15, 17, 25, 27]] = 1\n perimeter_weights[[21, 33]] = sqrt(2)\n perimeter_weights[[13, 23]] = (1 + sqrt(2)) / 2"
}
] |
scikit-image | 742699c570ef03b41ee61c9d1c2513afa99e3ba0 | debd4d54d6d81e491f3ca712b8da4d5a721c5d9f | skimage/transform/tests/test_hough_transform.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -197,7 +197,7 @@ def test_hough_ellipse_non_zero_angle2():
best = heapq.nlargest(1, result)[0]
assert_almost_equal(best[1] / 100., x0 / 100., decimal=1)
assert_almost_equal(best[2] / 100., y0 / 100., decimal=1)
- assert_almost_equal(best[3] / 100., a / 100., decimal=1)
+ assert_almost_equal(best[3] / 10., a / 10., decimal=1)
assert_almost_equal(best[3] / 100., b / 100., decimal=1)
assert_almost_equal(best[5], angle, decimal=1)
| assert_almost_equal ( best [ 3 ] / 100. , a / 100. , decimal = 1 ) | assert_almost_equal ( best [ 3 ] / 10. , a / 10. , decimal = 1 ) | SINGLE_STMT | [["Update", ["float:100.", 3, 35, 3, 39], "10."], ["Update", ["float:100.", 3, 45, 3, 49], "10."]] | matsuken92/scikit-image@742699c570ef03b41ee61c9d1c2513afa99e3ba0 | TEST: fix precision | [
{
"sha": "db8d1bbcd8c1f7d25ba4cac7fc7706a1ff6228b3",
"filename": "skimage/transform/tests/test_hough_transform.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/742699c570ef03b41ee61c9d1c2513afa99e3ba0/skimage%2Ftransform%2Ftests%2Ftest_hough_transform.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/742699c570ef03b41ee61c9d1c2513afa99e3ba0/skimage%2Ftransform%2Ftests%2Ftest_hough_transform.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ftransform%2Ftests%2Ftest_hough_transform.py?ref=742699c570ef03b41ee61c9d1c2513afa99e3ba0",
"patch": "@@ -197,7 +197,7 @@ def test_hough_ellipse_non_zero_angle2():\n best = heapq.nlargest(1, result)[0]\n assert_almost_equal(best[1] / 100., x0 / 100., decimal=1)\n assert_almost_equal(best[2] / 100., y0 / 100., decimal=1)\n- assert_almost_equal(best[3] / 100., a / 100., decimal=1)\n+ assert_almost_equal(best[3] / 10., a / 10., decimal=1)\n assert_almost_equal(best[3] / 100., b / 100., decimal=1)\n assert_almost_equal(best[5], angle, decimal=1)\n "
}
] |
scikit-image | 594a228a0651343dbb06a136fea7b3575c06dfed | 742699c570ef03b41ee61c9d1c2513afa99e3ba0 | skimage/transform/tests/test_hough_transform.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -198,7 +198,7 @@ def test_hough_ellipse_non_zero_angle2():
assert_almost_equal(best[1] / 100., x0 / 100., decimal=1)
assert_almost_equal(best[2] / 100., y0 / 100., decimal=1)
assert_almost_equal(best[3] / 10., a / 10., decimal=1)
- assert_almost_equal(best[3] / 100., b / 100., decimal=1)
+ assert_almost_equal(best[4] / 100., b / 100., decimal=1)
assert_almost_equal(best[5], angle, decimal=1)
| assert_almost_equal ( best [ 3 ] / 100. , b / 100. , decimal = 1 ) | assert_almost_equal ( best [ 4 ] / 100. , b / 100. , decimal = 1 ) | CHANGE_NUMERIC_LITERAL | [["Update", ["integer:3", 3, 30, 3, 31], "4"]] | matsuken92/scikit-image@594a228a0651343dbb06a136fea7b3575c06dfed | TEST: fix bad subs | [
{
"sha": "69e92492e10fc7e79c19ad6c19c4b53e85f6fbcf",
"filename": "skimage/transform/tests/test_hough_transform.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/594a228a0651343dbb06a136fea7b3575c06dfed/skimage%2Ftransform%2Ftests%2Ftest_hough_transform.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/594a228a0651343dbb06a136fea7b3575c06dfed/skimage%2Ftransform%2Ftests%2Ftest_hough_transform.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ftransform%2Ftests%2Ftest_hough_transform.py?ref=594a228a0651343dbb06a136fea7b3575c06dfed",
"patch": "@@ -198,7 +198,7 @@ def test_hough_ellipse_non_zero_angle2():\n assert_almost_equal(best[1] / 100., x0 / 100., decimal=1)\n assert_almost_equal(best[2] / 100., y0 / 100., decimal=1)\n assert_almost_equal(best[3] / 10., a / 10., decimal=1)\n- assert_almost_equal(best[3] / 100., b / 100., decimal=1)\n+ assert_almost_equal(best[4] / 100., b / 100., decimal=1)\n assert_almost_equal(best[5], angle, decimal=1)\n \n "
}
] |
scikit-image | 927ba2cd8ec9c337989eda60352b6841d2495ac1 | f25ca3a835a7f90251fc28ac2e82bf55ef5fe4d5 | skimage/segmentation/random_walker_segmentation.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -101,7 +101,7 @@ def _compute_gradients_3d(data, spacing):
gr_deep = np.abs(data[:, :, :-1] - data[:, :, 1:]).ravel() / spacing[2]
gr_right = np.abs(data[:, :-1] - data[:, 1:]).ravel() / spacing[1]
gr_down = np.abs(data[:-1] - data[1:]).ravel() / spacing[0]
- return np.r_[gr_down, gr_right, gr_deep]
+ return np.r_[gr_deep, gr_right, gr_down]
def _make_laplacian_sparse(edges, weights):
| return np . r_ [ gr_down , gr_right , gr_deep ] | return np . r_ [ gr_deep , gr_right , gr_down ] | SINGLE_STMT | [["Update", ["identifier:gr_down", 3, 18, 3, 25], "gr_deep"], ["Update", ["identifier:gr_deep", 3, 37, 3, 44], "gr_down"]] | matsuken92/scikit-image@927ba2cd8ec9c337989eda60352b6841d2495ac1 | FIX: roll back incorrect testing change of gradient order | [
{
"sha": "213cf94fa3e3d8a2c72f7a2603342f34f20c88df",
"filename": "skimage/segmentation/random_walker_segmentation.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/927ba2cd8ec9c337989eda60352b6841d2495ac1/skimage%2Fsegmentation%2Frandom_walker_segmentation.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/927ba2cd8ec9c337989eda60352b6841d2495ac1/skimage%2Fsegmentation%2Frandom_walker_segmentation.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fsegmentation%2Frandom_walker_segmentation.py?ref=927ba2cd8ec9c337989eda60352b6841d2495ac1",
"patch": "@@ -101,7 +101,7 @@ def _compute_gradients_3d(data, spacing):\n gr_deep = np.abs(data[:, :, :-1] - data[:, :, 1:]).ravel() / spacing[2]\n gr_right = np.abs(data[:, :-1] - data[:, 1:]).ravel() / spacing[1]\n gr_down = np.abs(data[:-1] - data[1:]).ravel() / spacing[0]\n- return np.r_[gr_down, gr_right, gr_deep]\n+ return np.r_[gr_deep, gr_right, gr_down]\n \n \n def _make_laplacian_sparse(edges, weights):"
}
] |
scikit-image | b9f5dd3ad5f3dace93f26f00570163e1fe5f96ba | a229d19eb031f7628cc0bb8aad06f75933f6266b | skimage/draw/draw3d.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -17,7 +17,7 @@ def ellipsoid(a, b, c, spacing=(1., 1., 1.), levelset=False):
c : float
Length of semimajor axis aligned with z-axis.
spacing : tuple of floats, length 3
- spacing in (x, y, z) spatial dimensions.
+ Spacing in (x, y, z) spatial dimensions.
levelset : bool
If True, returns the level set for this ellipsoid (signed level
set about zero, with positive denoting interior) as np.float64.
| spacing in ( x , y , z ) spatial dimensions . levelset : bool | Spacing in ( x , y , z ) spatial dimensions . levelset : bool | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:spacing", 3, 9, 3, 16], "Spacing"]] | matsuken92/scikit-image@b9f5dd3ad5f3dace93f26f00570163e1fe5f96ba | DOC: Fix capitalization in ellipsoid docstring. | [
{
"sha": "db2f0d396b13b0162feb33c0f383a36536326d24",
"filename": "skimage/draw/draw3d.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/b9f5dd3ad5f3dace93f26f00570163e1fe5f96ba/skimage%2Fdraw%2Fdraw3d.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/b9f5dd3ad5f3dace93f26f00570163e1fe5f96ba/skimage%2Fdraw%2Fdraw3d.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fdraw%2Fdraw3d.py?ref=b9f5dd3ad5f3dace93f26f00570163e1fe5f96ba",
"patch": "@@ -17,7 +17,7 @@ def ellipsoid(a, b, c, spacing=(1., 1., 1.), levelset=False):\n c : float\n Length of semimajor axis aligned with z-axis.\n spacing : tuple of floats, length 3\n- spacing in (x, y, z) spatial dimensions.\n+ Spacing in (x, y, z) spatial dimensions.\n levelset : bool\n If True, returns the level set for this ellipsoid (signed level\n set about zero, with positive denoting interior) as np.float64."
}
] |
scikit-image | 67cbb0221db8419a18bd5e6b677aa9b29e1eb489 | 0bf06fbbc270b416130368ee8ab95dd2d9ccff3b | skimage/transform/_geometric.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -1038,7 +1038,7 @@ def warp(image, inverse_map=None, map_args={}, output_shape=None, order=1,
if isinstance(inverse_map, np.ndarray) and inverse_map.shape == (3, 3):
matrix = inverse_map
- elif inverse_map in HOMOGRAPHY_TRANSFORMS:
+ elif isinstance(inverse_map, HOMOGRAPHY_TRANSFORMS):
matrix = inverse_map._matrix
elif (hasattr(inverse_map, '__name__')
| if isinstance ( inverse_map , np . ndarray ) and inverse_map . shape == ( 3 , 3 ) : matrix = inverse_map elif inverse_map in HOMOGRAPHY_TRANSFORMS : matrix = inverse_map . _matrix | if isinstance ( inverse_map , np . ndarray ) and inverse_map . shape == ( 3 , 3 ) : matrix = inverse_map elif isinstance ( inverse_map , HOMOGRAPHY_TRANSFORMS ) : matrix = inverse_map . _matrix | SINGLE_STMT | [["Insert", ["elif_clause", 3, 9, 4, 41], ["call", "N0"], 1], ["Insert", "N0", ["identifier:isinstance", "T"], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Move", "N1", ["identifier:inverse_map", 3, 14, 3, 25], 1], ["Insert", "N1", [",:,", "T"], 2], ["Move", "N1", ["identifier:HOMOGRAPHY_TRANSFORMS", 3, 29, 3, 50], 3], ["Insert", "N1", ["):)", "T"], 4], ["Delete", ["in:in", 3, 26, 3, 28]], ["Delete", ["comparison_operator", 3, 14, 3, 50]]] | matsuken92/scikit-image@67cbb0221db8419a18bd5e6b677aa9b29e1eb489 | Fix bug in homography detection | [
{
"sha": "339ffaaff3def3fed4edfbbbe1e05f3a3a81a623",
"filename": "skimage/transform/_geometric.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/67cbb0221db8419a18bd5e6b677aa9b29e1eb489/skimage%2Ftransform%2F_geometric.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/67cbb0221db8419a18bd5e6b677aa9b29e1eb489/skimage%2Ftransform%2F_geometric.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ftransform%2F_geometric.py?ref=67cbb0221db8419a18bd5e6b677aa9b29e1eb489",
"patch": "@@ -1038,7 +1038,7 @@ def warp(image, inverse_map=None, map_args={}, output_shape=None, order=1,\n if isinstance(inverse_map, np.ndarray) and inverse_map.shape == (3, 3):\n matrix = inverse_map\n \n- elif inverse_map in HOMOGRAPHY_TRANSFORMS:\n+ elif isinstance(inverse_map, HOMOGRAPHY_TRANSFORMS):\n matrix = inverse_map._matrix\n \n elif (hasattr(inverse_map, '__name__')"
}
] |
scikit-image | 5a7e191f7b2751ede70606c06393cbfbf9f18ec6 | 0b2103b72c00be109dceb5268043a2d2a155e136 | skimage/color/colorlabel.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -17,7 +17,7 @@ DEFAULT_COLORS = ('red', 'blue', 'yellow', 'magenta', 'green',
'indigo', 'darkorange', 'cyan', 'pink', 'yellowgreen')
-color_dict = dict((k, v) for k, v in rgb_colors.__dict__.iteritems()
+color_dict = dict((k, v) for k, v in six.iteritems(rgb_colors.__dict__)
if isinstance(v, tuple))
| color_dict = dict ( ( k , v ) for k , v in rgb_colors . __dict__ . iteritems ( ) if isinstance ( v , tuple ) ) | color_dict = dict ( ( k , v ) for k , v in six . iteritems ( rgb_colors . __dict__ ) if isinstance ( v , tuple ) ) | SINGLE_STMT | [["Insert", ["attribute", 3, 38, 3, 67], ["identifier:six", "T"], 0], ["Insert", ["attribute", 3, 38, 3, 67], [".:.", "T"], 1], ["Move", ["argument_list", 3, 67, 3, 69], ["attribute", 3, 38, 3, 57], 1], ["Delete", [".:.", 3, 57, 3, 58]]] | matsuken92/scikit-image@5a7e191f7b2751ede70606c06393cbfbf9f18ec6 | Fix Python 3 incompatibility | [
{
"sha": "70803961329296f505a3270faa201dc13c0fca0d",
"filename": "skimage/color/colorlabel.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/5a7e191f7b2751ede70606c06393cbfbf9f18ec6/skimage%2Fcolor%2Fcolorlabel.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/5a7e191f7b2751ede70606c06393cbfbf9f18ec6/skimage%2Fcolor%2Fcolorlabel.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fcolor%2Fcolorlabel.py?ref=5a7e191f7b2751ede70606c06393cbfbf9f18ec6",
"patch": "@@ -17,7 +17,7 @@\n 'indigo', 'darkorange', 'cyan', 'pink', 'yellowgreen')\n \n \n-color_dict = dict((k, v) for k, v in rgb_colors.__dict__.iteritems()\n+color_dict = dict((k, v) for k, v in six.iteritems(rgb_colors.__dict__)\n if isinstance(v, tuple))\n \n "
}
] |
scikit-image | 20ad4bbca9220b7153b03e1bee4215dc32466d6a | 5a7e191f7b2751ede70606c06393cbfbf9f18ec6 | skimage/novice/_novice.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -13,7 +13,7 @@ from skimage._shared import six
# Convert colors from `skimage.color` to uint8 and allow access through
# dict or a named tuple.
color_dict = dict((name, tuple(int(255 * c + 0.5) for c in rgb))
- for name, rgb in color_dict.iteritems())
+ for name, rgb in six.iteritems(color_dict))
colors = namedtuple('colors', color_dict.keys())(**color_dict)
| color_dict = dict ( ( name , tuple ( int ( 255 * c + 0.5 ) for c in rgb ) ) for name , rgb in color_dict . iteritems ( ) ) | color_dict = dict ( ( name , tuple ( int ( 255 * c + 0.5 ) for c in rgb ) ) for name , rgb in six . iteritems ( color_dict ) ) | SINGLE_STMT | [["Insert", ["attribute", 3, 36, 3, 56], ["identifier:six", "T"], 0], ["Move", ["argument_list", 3, 56, 3, 58], ["identifier:color_dict", 3, 36, 3, 46], 1]] | matsuken92/scikit-image@20ad4bbca9220b7153b03e1bee4215dc32466d6a | Fix the same Py3 incompatibility in a different place | [
{
"sha": "6c43d73fb9fa529c497d4514da6b74968e89a448",
"filename": "skimage/novice/_novice.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/20ad4bbca9220b7153b03e1bee4215dc32466d6a/skimage%2Fnovice%2F_novice.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/20ad4bbca9220b7153b03e1bee4215dc32466d6a/skimage%2Fnovice%2F_novice.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fnovice%2F_novice.py?ref=20ad4bbca9220b7153b03e1bee4215dc32466d6a",
"patch": "@@ -13,7 +13,7 @@\n # Convert colors from `skimage.color` to uint8 and allow access through\n # dict or a named tuple.\n color_dict = dict((name, tuple(int(255 * c + 0.5) for c in rgb))\n- for name, rgb in color_dict.iteritems())\n+ for name, rgb in six.iteritems(color_dict))\n colors = namedtuple('colors', color_dict.keys())(**color_dict)\n \n "
}
] |
scikit-image | f11ef60c35d9e986ec77c5adb99da8c6cbe6b89d | 7d4544f203036407e2dca122ad346a81fd45b1de | skimage/novice/_novice.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -14,7 +14,7 @@ try:
from urlparse import urlparse
except ImportError:
try:
- from urllib import parse as urlparse
+ from urllib.parse import urlparse
except ImportError:
from six.moves.urllib_parse import urlparse
| from urllib import parse as urlparse | from urllib . parse import urlparse | SINGLE_STMT | [["Move", ["import_from_statement", 3, 9, 3, 45], ["dotted_name", 3, 28, 3, 33], 3], ["Insert", ["dotted_name", 3, 14, 3, 20], [".:.", "T"], 1], ["Move", ["dotted_name", 3, 14, 3, 20], ["identifier:parse", 3, 28, 3, 33], 2], ["Move", ["dotted_name", 3, 28, 3, 33], ["identifier:urlparse", 3, 37, 3, 45], 0], ["Delete", ["as:as", 3, 34, 3, 36]], ["Delete", ["aliased_import", 3, 28, 3, 45]]] | matsuken92/scikit-image@f11ef60c35d9e986ec77c5adb99da8c6cbe6b89d | Fixed import of urlparse and rebase on upstream | [
{
"sha": "c582ef0e6ec08f92f7288a61a5bfc937bd02fb62",
"filename": "skimage/novice/_novice.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/f11ef60c35d9e986ec77c5adb99da8c6cbe6b89d/skimage%2Fnovice%2F_novice.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/f11ef60c35d9e986ec77c5adb99da8c6cbe6b89d/skimage%2Fnovice%2F_novice.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fnovice%2F_novice.py?ref=f11ef60c35d9e986ec77c5adb99da8c6cbe6b89d",
"patch": "@@ -14,7 +14,7 @@\n from urlparse import urlparse\n except ImportError:\n try:\n- from urllib import parse as urlparse\n+ from urllib.parse import urlparse\n except ImportError:\n from six.moves.urllib_parse import urlparse\n "
}
] |
scikit-image | 22273a51602f0676fd9ce239783b38028e2525f8 | 8e695f87344a8986b7d43a149200f41e5088984a | skimage/filter/rank/tests/test_rank.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -437,7 +437,7 @@ def test_16bit():
image[10, 10] = value
assert rank.minimum(image, selem)[10, 10] == 0
assert rank.maximum(image, selem)[10, 10] == value
- assert rank.mean(image, selem)[10, 10] == value / selem.size
+ assert rank.mean(image, selem)[10, 10] == int(value / selem.size)
def test_bilateral():
| assert rank . mean ( image , selem ) [ 10 , 10 ] == value / selem . size | assert rank . mean ( image , selem ) [ 10 , 10 ] == int ( value / selem . size ) | ADD_FUNCTION_AROUND_EXPRESSION | [["Insert", ["comparison_operator", 3, 16, 3, 69], ["call", "N0"], 2], ["Insert", "N0", ["identifier:int", "T"], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Move", "N1", ["binary_operator", 3, 51, 3, 69], 1], ["Insert", "N1", ["):)", "T"], 2]] | matsuken92/scikit-image@22273a51602f0676fd9ce239783b38028e2525f8 | Fix 16bit rank filter test in python 3.x | [
{
"sha": "cedeb92da7617f289a2723968c890d159ea5871d",
"filename": "skimage/filter/rank/tests/test_rank.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/22273a51602f0676fd9ce239783b38028e2525f8/skimage%2Ffilter%2Frank%2Ftests%2Ftest_rank.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/22273a51602f0676fd9ce239783b38028e2525f8/skimage%2Ffilter%2Frank%2Ftests%2Ftest_rank.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffilter%2Frank%2Ftests%2Ftest_rank.py?ref=22273a51602f0676fd9ce239783b38028e2525f8",
"patch": "@@ -437,7 +437,7 @@ def test_16bit():\n image[10, 10] = value\n assert rank.minimum(image, selem)[10, 10] == 0\n assert rank.maximum(image, selem)[10, 10] == value\n- assert rank.mean(image, selem)[10, 10] == value / selem.size\n+ assert rank.mean(image, selem)[10, 10] == int(value / selem.size)\n \n \n def test_bilateral():"
}
] |
scikit-image | 8b74ab496b8f29ff66889b8c15df8d37635595bc | 6e6ca8697ca88a5d939bdb2d2b52ada8b5a5200b | skimage/viewer/plugins/measure.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -47,4 +47,4 @@ class Measure(Plugin):
dx = np.diff(x)[0]
dy = np.diff(y)[0]
self._length.text = '%.1f' % np.hypot(dx, dy)
- self._angle.text = u'%.1f°' % (180 - np.arctan2(dy, dx) * rad2deg)
+ self._angle.text = '%.1f°' % (180 - np.arctan2(dy, dx) * rad2deg)
| self . _angle . text = u'%.1f°' 1 80 p. a rctan2( d y, x) ad2deg) | self . _angle . text = '%.1f°' 1 80 p. a rctan2( d y, x) ad2deg) | CHANGE_BINARY_OPERAND | [["Update", ["string:u'%.1f\u00b0' ", 3, 28, 3, 37], "'%.1f\u00b0' "]] | matsuken92/scikit-image@8b74ab496b8f29ff66889b8c15df8d37635595bc | Fix python 3 syntax error | [
{
"sha": "eeaa13b0d0e657c4a710ce48be990aee290611ac",
"filename": "skimage/viewer/plugins/measure.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/8b74ab496b8f29ff66889b8c15df8d37635595bc/skimage%2Fviewer%2Fplugins%2Fmeasure.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/8b74ab496b8f29ff66889b8c15df8d37635595bc/skimage%2Fviewer%2Fplugins%2Fmeasure.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fviewer%2Fplugins%2Fmeasure.py?ref=8b74ab496b8f29ff66889b8c15df8d37635595bc",
"patch": "@@ -47,4 +47,4 @@ def line_changed(self, end_points):\n dx = np.diff(x)[0]\n dy = np.diff(y)[0]\n self._length.text = '%.1f' % np.hypot(dx, dy)\n- self._angle.text = u'%.1f°' % (180 - np.arctan2(dy, dx) * rad2deg)\n+ self._angle.text = '%.1f°' % (180 - np.arctan2(dy, dx) * rad2deg)"
}
] |
scikit-image | 5c2189550af5d44a23981f857a2d790588ea5f99 | 5de38f290c592fe88b07c9802b45a0027ee3d702 | skimage/viewer/tests/test_viewer.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -40,7 +40,7 @@ def make_key_event(key):
@skipif(not viewer_available)
def test_collection_viewer():
- img = data.astro()
+ img = data.astronaut()
img_collection = tuple(pyramid_gaussian(img))
view = CollectionViewer(img_collection)
| img = data . astro ( ) | img = data . astronaut ( ) | WRONG_FUNCTION_NAME | [["Update", ["identifier:astro", 3, 16, 3, 21], "astronaut"]] | matsuken92/scikit-image@5c2189550af5d44a23981f857a2d790588ea5f99 | removed typo that caused test error | [
{
"sha": "7a110953a5016a91cc3575609e41868ce1de880c",
"filename": "skimage/viewer/tests/test_viewer.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/5c2189550af5d44a23981f857a2d790588ea5f99/skimage%2Fviewer%2Ftests%2Ftest_viewer.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/5c2189550af5d44a23981f857a2d790588ea5f99/skimage%2Fviewer%2Ftests%2Ftest_viewer.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fviewer%2Ftests%2Ftest_viewer.py?ref=5c2189550af5d44a23981f857a2d790588ea5f99",
"patch": "@@ -40,7 +40,7 @@ def make_key_event(key):\n @skipif(not viewer_available)\n def test_collection_viewer():\n \n- img = data.astro()\n+ img = data.astronaut()\n img_collection = tuple(pyramid_gaussian(img))\n \n view = CollectionViewer(img_collection)"
}
] |
scikit-image | 3260594268f19dcfe1ea5613f939c892d609b47e | 2e90f4b15d9f7f8789cf1bc30cdb7d14af65dbed | skimage/filters/tests/test_filter_import.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -8,4 +8,4 @@ def test_filter_import():
assert('sobel' in dir(F))
assert any(['has been renamed' in w
- for (w, _, _) in F.__warningregistry__])
+ for (w, _, _) in F.__warningregistry__]), F.__warningregistry__
| assert any ( [ 'has been renamed' in w for ( w , _ , _ ) in F . __warningregistry__ ] ) | assert any ( [ 'has been renamed' in w for ( w , _ , _ ) in F . __warningregistry__ ] ) , F . __warningregistry__ | SINGLE_STMT | [["Insert", ["assert_statement", 2, 5, 3, 57], [",:,", "T"], 2], ["Insert", ["assert_statement", 2, 5, 3, 57], ["attribute", "N0"], 3], ["Insert", "N0", ["identifier:F", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:__warningregistry__", "T"], 2]] | matsuken92/scikit-image@3260594268f19dcfe1ea5613f939c892d609b47e | Add debug print to failing assert | [
{
"sha": "133ad26278dd861c2071fc6a42c766fbf7423550",
"filename": "skimage/filters/tests/test_filter_import.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/3260594268f19dcfe1ea5613f939c892d609b47e/skimage%2Ffilters%2Ftests%2Ftest_filter_import.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/3260594268f19dcfe1ea5613f939c892d609b47e/skimage%2Ffilters%2Ftests%2Ftest_filter_import.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffilters%2Ftests%2Ftest_filter_import.py?ref=3260594268f19dcfe1ea5613f939c892d609b47e",
"patch": "@@ -8,4 +8,4 @@ def test_filter_import():\n \n assert('sobel' in dir(F))\n assert any(['has been renamed' in w\n- for (w, _, _) in F.__warningregistry__])\n+ for (w, _, _) in F.__warningregistry__]), F.__warningregistry__"
}
] |
scikit-image | a38b1c12579214cf77785e9c85f30202b2048c4f | 21d3f151c0531b625f5acce05a85b4da6cb80b13 | skimage/exposure/_adapthist.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -136,7 +136,7 @@ def _clahe(image, ntiles_x, ntiles_y, clip_limit, nbins=128):
image = pad(image, ((0, h_pad), (0, w_pad)), mode='reflect')
h_inner, w_inner = image.shape
- bin_size = 1 + NR_OF_GREY / nbins
+ bin_size = 1 + NR_OF_GREY // nbins
lut = np.arange(NR_OF_GREY)
lut //= bin_size
img_blocks = view_as_blocks(image, (height, width))
| bin_size = 1 + NR_OF_GREY / nbins | bin_size = 1 + NR_OF_GREY // nbins | CHANGE_BINARY_OPERATOR | [["Insert", ["binary_operator", 3, 20, 3, 38], ["//://", "T"], 1], ["Delete", ["/:/", 3, 31, 3, 32]]] | matsuken92/scikit-image@a38b1c12579214cf77785e9c85f30202b2048c4f | Fix integer division in CLAHE | [
{
"sha": "668d27a68bfc62ab3e39bfa369f23dc95f18f4ed",
"filename": "skimage/exposure/_adapthist.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/a38b1c12579214cf77785e9c85f30202b2048c4f/skimage%2Fexposure%2F_adapthist.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/a38b1c12579214cf77785e9c85f30202b2048c4f/skimage%2Fexposure%2F_adapthist.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fexposure%2F_adapthist.py?ref=a38b1c12579214cf77785e9c85f30202b2048c4f",
"patch": "@@ -136,7 +136,7 @@ def _clahe(image, ntiles_x, ntiles_y, clip_limit, nbins=128):\n image = pad(image, ((0, h_pad), (0, w_pad)), mode='reflect')\n h_inner, w_inner = image.shape\n \n- bin_size = 1 + NR_OF_GREY / nbins\n+ bin_size = 1 + NR_OF_GREY // nbins\n lut = np.arange(NR_OF_GREY)\n lut //= bin_size\n img_blocks = view_as_blocks(image, (height, width))"
}
] |
scikit-image | cb2745cfdfa7e90de4a7201300d5d22ae8015e0e | 3829401e9f1d9503f874d13eb77ee4ec9e73ed70 | skimage/measure/_label.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -1,6 +1,6 @@
from ._ccomp import label as _label
-def label(input, neighbors=8, background=None, return_num=False,
+def label(input, neighbors=None, background=None, return_num=False,
connectivity=None):
return _label(input, neighbors, background, return_num, connectivity)
| def label ( input , neighbors = 8 , background = None , return_num = False , connectivity = None ) : return _label ( input , neighbors , background , return_num , connectivity ) | def label ( input , neighbors = None , background = None , return_num = False , connectivity = None ) : return _label ( input , neighbors , background , return_num , connectivity ) | SINGLE_TOKEN | [["Insert", ["default_parameter", 2, 18, 2, 29], ["none:None", "T"], 2], ["Delete", ["integer:8", 2, 28, 2, 29]]] | matsuken92/scikit-image@cb2745cfdfa7e90de4a7201300d5d22ae8015e0e | Change default neighbors to None | [
{
"sha": "e3ac60346df6836c180b31582aef9e1c9d015384",
"filename": "skimage/measure/_label.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/cb2745cfdfa7e90de4a7201300d5d22ae8015e0e/skimage%2Fmeasure%2F_label.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/cb2745cfdfa7e90de4a7201300d5d22ae8015e0e/skimage%2Fmeasure%2F_label.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fmeasure%2F_label.py?ref=cb2745cfdfa7e90de4a7201300d5d22ae8015e0e",
"patch": "@@ -1,6 +1,6 @@\n from ._ccomp import label as _label\n \n-def label(input, neighbors=8, background=None, return_num=False,\n+def label(input, neighbors=None, background=None, return_num=False,\n connectivity=None):\n return _label(input, neighbors, background, return_num, connectivity)\n "
}
] |
scikit-image | 8b9a777c79526bebdc75b5bce19c64f55ee94741 | c5e38dc5b1f2d3ae572734c304a5920f46829351 | skimage/restoration/__init__.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -22,7 +22,7 @@ from .deconvolution import wiener, unsupervised_wiener, richardson_lucy
from .unwrap import unwrap_phase
from ._denoise import denoise_tv_chambolle, denoise_tv_bregman, \
denoise_bilateral
-from .nl_means_denoising import nl_means_denoising, fast_nl_means_denoising
+from .non_local_means import nl_means_denoising, fast_nl_means_denoising
__all__ = ['wiener',
'unsupervised_wiener',
| from . nl_means_denoising import nl_means_denoising , fast_nl_means_denoising | from . non_local_means import nl_means_denoising , fast_nl_means_denoising | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:nl_means_denoising", 3, 7, 3, 25], "non_local_means"]] | matsuken92/scikit-image@8b9a777c79526bebdc75b5bce19c64f55ee94741 | Bug correction: I had forgotten to add __init__.py | [
{
"sha": "9f708852c06db3cd4a6991053b905bd4d547a6e7",
"filename": "skimage/restoration/__init__.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/8b9a777c79526bebdc75b5bce19c64f55ee94741/skimage%2Frestoration%2F__init__.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/8b9a777c79526bebdc75b5bce19c64f55ee94741/skimage%2Frestoration%2F__init__.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Frestoration%2F__init__.py?ref=8b9a777c79526bebdc75b5bce19c64f55ee94741",
"patch": "@@ -22,7 +22,7 @@\n from .unwrap import unwrap_phase\n from ._denoise import denoise_tv_chambolle, denoise_tv_bregman, \\\n denoise_bilateral\n-from .nl_means_denoising import nl_means_denoising, fast_nl_means_denoising\n+from .non_local_means import nl_means_denoising, fast_nl_means_denoising\n \n __all__ = ['wiener',\n 'unsupervised_wiener',"
}
] |
scikit-image | 9438b96774be506e80de514fc00c82be7c985e67 | d24ce2b4ab32e4b2de7e0a0afcae69935490c1be | skimage/color/colorlabel.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -64,7 +64,7 @@ def _match_label_with_color(label, colors, bg_label, bg_color):
def label2rgb(label, image=None, colors=None, alpha=0.3,
- bg_label=-1, bg_color=None, image_alpha=1, kind='overlay'):
+ bg_label=-1, bg_color=(0, 0, 0), image_alpha=1, kind='overlay'):
| def label2rgb ( label , image = None , colors = None , alpha = 0.3 , bg_label = - 1 , bg_color = None , image_alpha = 1 , kind = 'overlay' ) : | def label2rgb ( label , image = None , colors = None , alpha = 0.3 , bg_label = - 1 , bg_color = ( 0 , 0 , 0 ) , image_alpha = 1 , kind = 'overlay' ) : | SINGLE_STMT | [["Insert", ["default_parameter", 3, 28, 3, 41], ["tuple", "N0"], 2], ["Insert", "N0", ["(:(", "T"], 0], ["Insert", "N0", ["integer:0", "T"], 1], ["Insert", "N0", [",:,", "T"], 2], ["Insert", "N0", ["integer:0", "T"], 3], ["Insert", "N0", [",:,", "T"], 4], ["Insert", "N0", ["integer:0", "T"], 5], ["Insert", "N0", ["):)", "T"], 6], ["Delete", ["none:None", 3, 37, 3, 41]]] | matsuken92/scikit-image@9438b96774be506e80de514fc00c82be7c985e67 | Add default bg_color to label2rgb | [
{
"sha": "ecf56ed9474a12ba0c53576edad7a94a49cef420",
"filename": "skimage/color/colorlabel.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/9438b96774be506e80de514fc00c82be7c985e67/skimage%2Fcolor%2Fcolorlabel.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/9438b96774be506e80de514fc00c82be7c985e67/skimage%2Fcolor%2Fcolorlabel.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fcolor%2Fcolorlabel.py?ref=9438b96774be506e80de514fc00c82be7c985e67",
"patch": "@@ -64,7 +64,7 @@ def _match_label_with_color(label, colors, bg_label, bg_color):\n \n \n def label2rgb(label, image=None, colors=None, alpha=0.3,\n- bg_label=-1, bg_color=None, image_alpha=1, kind='overlay'):\n+ bg_label=-1, bg_color=(0, 0, 0), image_alpha=1, kind='overlay'):\n \"\"\"Return an RGB image where color-coded labels are painted over the image.\n \n Parameters"
}
] |
scikit-image | fab4ff23055201e64b47a03ccb075bb40c9caf55 | c68c8e5468e039ae7304f7bb4173b6c33f9aa2ca | skimage/io/_plugins/matplotlib_plugin.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -60,7 +60,7 @@ def imshow(im, *args, **kwargs):
kwargs.setdefault('vmax', hi)
ax = plt.imshow(im, *args, **kwargs)
if not supported_dtype or out_of_range_float or low_dynamic_range:
- ax.colorbar()
+ plt.colorbar()
return ax
imread = plt.imread
| ax . colorbar ( ) | plt . colorbar ( ) | SAME_FUNCTION_WRONG_CALLER | [["Update", ["identifier:ax", 3, 9, 3, 11], "plt"]] | matsuken92/scikit-image@fab4ff23055201e64b47a03ccb075bb40c9caf55 | Fix incorrect call to colorbar | [
{
"sha": "01a873c06e44893efc9f2e29426ed94f7ea2d205",
"filename": "skimage/io/_plugins/matplotlib_plugin.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/fab4ff23055201e64b47a03ccb075bb40c9caf55/skimage%2Fio%2F_plugins%2Fmatplotlib_plugin.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/fab4ff23055201e64b47a03ccb075bb40c9caf55/skimage%2Fio%2F_plugins%2Fmatplotlib_plugin.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fio%2F_plugins%2Fmatplotlib_plugin.py?ref=fab4ff23055201e64b47a03ccb075bb40c9caf55",
"patch": "@@ -60,7 +60,7 @@ def imshow(im, *args, **kwargs):\n kwargs.setdefault('vmax', hi)\n ax = plt.imshow(im, *args, **kwargs)\n if not supported_dtype or out_of_range_float or low_dynamic_range:\n- ax.colorbar()\n+ plt.colorbar()\n return ax\n \n imread = plt.imread"
}
] |
scikit-image | c96fdb9338106546326fcd71cc0c067b6506038d | d7138f1a515f7b721c1472d979a49315c0a15006 | skimage/util/arraypad.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -1528,7 +1528,7 @@ def crop(ar, crop_width, copy=False, order='K'):
- ar = np.array(ar)
+ ar = np.array(ar, copy=False)
crops = _validate_lengths(ar, crop_width)
slices = tuple([slice(a, -b) for a, b in crops])
if copy:
| ar = np . array ( ar ) | ar = np . array ( ar , copy = False ) | SAME_FUNCTION_MORE_ARGS | [["Insert", ["argument_list", 0, 18, 0, 22], [",:,", "T"], 2], ["Insert", ["argument_list", 0, 18, 0, 22], ["keyword_argument", "N0"], 3], ["Insert", "N0", ["identifier:copy", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["false:False", "T"], 2]] | matsuken92/scikit-image@c96fdb9338106546326fcd71cc0c067b6506038d | Fix automatic copy even when copy=False in crop | [
{
"sha": "49f89e3d80676f37e163c0077f0d35ff21be199e",
"filename": "skimage/util/arraypad.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/c96fdb9338106546326fcd71cc0c067b6506038d/skimage%2Futil%2Farraypad.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/c96fdb9338106546326fcd71cc0c067b6506038d/skimage%2Futil%2Farraypad.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Futil%2Farraypad.py?ref=c96fdb9338106546326fcd71cc0c067b6506038d",
"patch": "@@ -1528,7 +1528,7 @@ def crop(ar, crop_width, copy=False, order='K'):\n The cropped array. If `copy=False` (default), this is a sliced\n view of the input array.\n \"\"\"\n- ar = np.array(ar)\n+ ar = np.array(ar, copy=False)\n crops = _validate_lengths(ar, crop_width)\n slices = tuple([slice(a, -b) for a, b in crops])\n if copy:"
}
] |
scikit-image | d538abdb97470cc4f95c32d6a22acb4f85257de2 | b1891dc24e8b3d6ab26221dfc521ee9d4d34d57b | skimage/util/arraypad.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -1532,7 +1532,7 @@ def crop(ar, crop_width, copy=False, order='K'):
crops = _validate_lengths(ar, crop_width)
slices = [slice(a, ar.shape[i] - b) for i, (a, b) in enumerate(crops)]
if copy:
- cropped = np.copy(ar[slices], order=order)
+ cropped = np.array(ar[slices], order=order, copy=True)
else:
cropped = ar[slices]
return cropped
| cropped = np . copy ( ar [ slices ] , order = order ) | cropped = np . array ( ar [ slices ] , order = order , copy = True ) | SINGLE_STMT | [["Update", ["identifier:copy", 3, 22, 3, 26], "array"], ["Insert", ["argument_list", 3, 26, 3, 51], [",:,", "T"], 4], ["Insert", ["argument_list", 3, 26, 3, 51], ["keyword_argument", "N0"], 5], ["Insert", "N0", ["identifier:copy", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["true:True", "T"], 2]] | matsuken92/scikit-image@d538abdb97470cc4f95c32d6a22acb4f85257de2 | Fix order kwarg for some versions of numpy.copy
It seems it isn't always a valid kwarg. This bypasses that problem
by calling `np.array` directly (which is just what `np.copy` does
under the hood anyway). | [
{
"sha": "3d9d65333a51727fefa39ae04ea0ca4aa240eb4b",
"filename": "skimage/util/arraypad.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/d538abdb97470cc4f95c32d6a22acb4f85257de2/skimage%2Futil%2Farraypad.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/d538abdb97470cc4f95c32d6a22acb4f85257de2/skimage%2Futil%2Farraypad.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Futil%2Farraypad.py?ref=d538abdb97470cc4f95c32d6a22acb4f85257de2",
"patch": "@@ -1532,7 +1532,7 @@ def crop(ar, crop_width, copy=False, order='K'):\n crops = _validate_lengths(ar, crop_width)\n slices = [slice(a, ar.shape[i] - b) for i, (a, b) in enumerate(crops)]\n if copy:\n- cropped = np.copy(ar[slices], order=order)\n+ cropped = np.array(ar[slices], order=order, copy=True)\n else:\n cropped = ar[slices]\n return cropped"
}
] |
scikit-image | 242dbf9b2bc02cddda942c1f0a0b03151eb232f2 | cb2002c36777be701c37d1958d5218ce289403ae | skimage/segmentation/boundaries.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -169,7 +169,7 @@ def find_boundaries(label_img, connectivity=1, mode='thick', background=0):
def mark_boundaries(image, label_img, color=(1, 1, 0),
- outline_color=(0, 0, 0), mode='outer', background_label=0):
+ outline_color=None, mode='outer', background_label=0):
| def mark_boundaries ( image , label_img , color = ( 1 , 1 , 0 ) , outline_color = ( 0 , 0 , 0 ) , mode = 'outer' , background_label = 0 ) : | def mark_boundaries ( image , label_img , color = ( 1 , 1 , 0 ) , outline_color = None , mode = 'outer' , background_label = 0 ) : | SINGLE_STMT | [["Insert", ["default_parameter", 3, 21, 3, 44], ["none:None", "T"], 2], ["Delete", ["(:(", 3, 35, 3, 36]], ["Delete", ["integer:0", 3, 36, 3, 37]], ["Delete", [",:,", 3, 37, 3, 38]], ["Delete", ["integer:0", 3, 39, 3, 40]], ["Delete", [",:,", 3, 40, 3, 41]], ["Delete", ["integer:0", 3, 42, 3, 43]], ["Delete", ["):)", 3, 43, 3, 44]], ["Delete", ["tuple", 3, 35, 3, 44]]] | matsuken92/scikit-image@242dbf9b2bc02cddda942c1f0a0b03151eb232f2 | Don't outline boundaries by default
mark_boundaries used to draw outlines by default. This was necessary
partly because of the asymmetric way boundaries were being drawn. Now,
boundaries are either thick or drawn around background or drawn with
subpixel precision, so I suggest that outlines are less needed. | [
{
"sha": "c637dd5fff4ec5a63111bce911114602c7466c6b",
"filename": "skimage/segmentation/boundaries.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/242dbf9b2bc02cddda942c1f0a0b03151eb232f2/skimage%2Fsegmentation%2Fboundaries.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/242dbf9b2bc02cddda942c1f0a0b03151eb232f2/skimage%2Fsegmentation%2Fboundaries.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fsegmentation%2Fboundaries.py?ref=242dbf9b2bc02cddda942c1f0a0b03151eb232f2",
"patch": "@@ -169,7 +169,7 @@ def find_boundaries(label_img, connectivity=1, mode='thick', background=0):\n \n \n def mark_boundaries(image, label_img, color=(1, 1, 0),\n- outline_color=(0, 0, 0), mode='outer', background_label=0):\n+ outline_color=None, mode='outer', background_label=0):\n \"\"\"Return image with boundaries between labeled regions highlighted.\n \n Parameters"
}
] |
scikit-image | ac5c0c30a985432e34cbb9d69c43221bb88209c3 | 9b9730b058c8f1b11cfcf2fe1438b2c672874e28 | skimage/segmentation/tests/test_boundaries.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -69,7 +69,7 @@ def test_mark_boundaries_subpixel():
[0, 0, 0, 0]], dtype=np.uint8)
np.random.seed(0)
image = np.round(np.random.rand(*labels.shape), 2)
- marked = np.mark_boundaries(image, labels, color=white, mode='subpixel')
+ marked = mark_boundaries(image, labels, color=white, mode='subpixel')
marked_proj = np.round(np.mean(marked, axis=-1), 2)
ref_result = np.array(
| marked = np . mark_boundaries ( image , labels , color = white , mode = 'subpixel' ) | marked = mark_boundaries ( image , labels , color = white , mode = 'subpixel' ) | SINGLE_STMT | [["Move", ["call", 3, 14, 3, 77], ["identifier:mark_boundaries", 3, 17, 3, 32], 0], ["Delete", ["identifier:np", 3, 14, 3, 16]], ["Delete", [".:.", 3, 16, 3, 17]], ["Delete", ["attribute", 3, 14, 3, 32]]] | matsuken92/scikit-image@ac5c0c30a985432e34cbb9d69c43221bb88209c3 | Fix incorrect call to mark_boundaries in test | [
{
"sha": "e6e401aca6fce0697df77044319a25351d1da05c",
"filename": "skimage/segmentation/tests/test_boundaries.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/ac5c0c30a985432e34cbb9d69c43221bb88209c3/skimage%2Fsegmentation%2Ftests%2Ftest_boundaries.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/ac5c0c30a985432e34cbb9d69c43221bb88209c3/skimage%2Fsegmentation%2Ftests%2Ftest_boundaries.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fsegmentation%2Ftests%2Ftest_boundaries.py?ref=ac5c0c30a985432e34cbb9d69c43221bb88209c3",
"patch": "@@ -69,7 +69,7 @@ def test_mark_boundaries_subpixel():\n [0, 0, 0, 0]], dtype=np.uint8)\n np.random.seed(0)\n image = np.round(np.random.rand(*labels.shape), 2)\n- marked = np.mark_boundaries(image, labels, color=white, mode='subpixel')\n+ marked = mark_boundaries(image, labels, color=white, mode='subpixel')\n marked_proj = np.round(np.mean(marked, axis=-1), 2)\n \n ref_result = np.array("
}
] |
scikit-image | 83a6b6484481712025862086bc0fc6df5afa1dfd | 23fd7b89aff9d8b2637ab39245d8617500ea64be | skimage/filter/thresholding.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -220,7 +220,7 @@ def threshold_isodata(image, nbins=256, return_all=False):
Returns
-------
- threshold : float, int, array
+ threshold : float or int or array
Threshold value(s).
References
| - - - - - - - threshold : float , int , array | - - - - - - - threshold : float or int or array | SINGLE_STMT | [["Insert", ["expression_statement", 2, 5, 3, 34], ["boolean_operator", "N0"], 0], ["Insert", "N0", ["boolean_operator", "N1"], 0], ["Insert", "N0", ["or:or", "T"], 1], ["Move", "N0", ["identifier:array", 3, 29, 3, 34], 2], ["Move", "N1", ["unary_operator", 2, 5, 3, 22], 0], ["Insert", "N1", ["or:or", "T"], 1], ["Move", "N1", ["identifier:int", 3, 24, 3, 27], 2], ["Delete", [",:,", 3, 22, 3, 23]], ["Delete", [",:,", 3, 27, 3, 28]]] | matsuken92/scikit-image@83a6b6484481712025862086bc0fc6df5afa1dfd | Fix return value description | [
{
"sha": "3985e278a7f2df433e41220683feb07da8fcd1a7",
"filename": "skimage/filter/thresholding.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/83a6b6484481712025862086bc0fc6df5afa1dfd/skimage%2Ffilter%2Fthresholding.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/83a6b6484481712025862086bc0fc6df5afa1dfd/skimage%2Ffilter%2Fthresholding.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffilter%2Fthresholding.py?ref=83a6b6484481712025862086bc0fc6df5afa1dfd",
"patch": "@@ -220,7 +220,7 @@ def threshold_isodata(image, nbins=256, return_all=False):\n \n Returns\n -------\n- threshold : float, int, array\n+ threshold : float or int or array\n Threshold value(s).\n \n References"
}
] |
scikit-image | adeb8689afaeea1852cb3d0dd9ccf76c0ccb509a | 95b20adee7ab33880163ffa81d51bd7f836a33e0 | skimage/graph/rag.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -289,7 +289,7 @@ def draw_rag(labels, rag, img, border_color=None, node_color='yellow',
>>> img = data.coffee()
>>> labels = segmentation.slic(img)
>>> g = graph.rag_mean_color(img, labels)
- >>> out = graph.rag_draw(labels, g, img)
+ >>> out = graph.draw_rag(labels, g, img)
| out = graph . rag_draw ( labels , g , img ) | out = graph . draw_rag ( labels , g , img ) | WRONG_FUNCTION_NAME | [["Update", ["identifier:rag_draw", 3, 21, 3, 29], "draw_rag"]] | matsuken92/scikit-image@adeb8689afaeea1852cb3d0dd9ccf76c0ccb509a | Fixed doctest | [
{
"sha": "7e87a78450fe8a21950e206d0bfcb92fd489d864",
"filename": "skimage/graph/rag.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/adeb8689afaeea1852cb3d0dd9ccf76c0ccb509a/skimage%2Fgraph%2Frag.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/adeb8689afaeea1852cb3d0dd9ccf76c0ccb509a/skimage%2Fgraph%2Frag.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fgraph%2Frag.py?ref=adeb8689afaeea1852cb3d0dd9ccf76c0ccb509a",
"patch": "@@ -289,7 +289,7 @@ def draw_rag(labels, rag, img, border_color=None, node_color='yellow',\n >>> img = data.coffee()\n >>> labels = segmentation.slic(img)\n >>> g = graph.rag_mean_color(img, labels)\n- >>> out = graph.rag_draw(labels, g, img)\n+ >>> out = graph.draw_rag(labels, g, img)\n \"\"\"\n rag = rag.copy()\n out = util.img_as_float(img)"
}
] |
scikit-image | bfcc27587aad3e0a1ede0a03162bdbd935eda313 | 218eb4e89eaef60124389ba3f7690a526e548b7d | skimage/filter/__init__.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -1,7 +1,7 @@
from .lpi_filter import inverse, wiener, LPIFilter2D
from ._gaussian import gaussian_filter
# Backward compatibility v<0.11
-from ..feature._canny import canny
+from ..feature import canny
from .edges import (sobel, hsobel, vsobel, scharr, hscharr, vscharr, prewitt,
hprewitt, vprewitt, roberts, roberts_positive_diagonal,
roberts_negative_diagonal)
| from . . feature . _canny import canny | from . . feature import canny | SINGLE_STMT | [["Delete", [".:.", 3, 15, 3, 16]], ["Delete", ["identifier:_canny", 3, 16, 3, 22]]] | matsuken92/scikit-image@bfcc27587aad3e0a1ede0a03162bdbd935eda313 | fix import in filter.__init__ | [
{
"sha": "9d9fea599748c9f795d5c4fc4f9559d8095727f0",
"filename": "skimage/filter/__init__.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/bfcc27587aad3e0a1ede0a03162bdbd935eda313/skimage%2Ffilter%2F__init__.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/bfcc27587aad3e0a1ede0a03162bdbd935eda313/skimage%2Ffilter%2F__init__.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffilter%2F__init__.py?ref=bfcc27587aad3e0a1ede0a03162bdbd935eda313",
"patch": "@@ -1,7 +1,7 @@\n from .lpi_filter import inverse, wiener, LPIFilter2D\n from ._gaussian import gaussian_filter\n # Backward compatibility v<0.11\n-from ..feature._canny import canny\n+from ..feature import canny\n from .edges import (sobel, hsobel, vsobel, scharr, hscharr, vscharr, prewitt,\n hprewitt, vprewitt, roberts, roberts_positive_diagonal,\n roberts_negative_diagonal)"
}
] |
scikit-image | 051c54c577b32f76f88fcd7d894767bc48b81bad | 39104e878f065b34ebd70beeac5d317a6c94f6ab | skimage/io/_plugins/freeimage_plugin.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -672,7 +672,7 @@ def _array_to_bitmap(array):
raise RuntimeError('Could not allocate image for storage')
try:
def n(arr): # normalise to freeimage's in-memory format
- return arr.T[:, ::-1]
+ return arr.T[..., ::-1]
wrapped_array = _wrap_bitmap_bits_in_array(bitmap, w_shape, dtype)
# swizzle the color components and flip the scanlines to go to
| return arr . T [ : , : : - 1 ] | return arr . T [ ... , : : - 1 ] | SINGLE_STMT | [["Insert", ["subscript", 3, 20, 3, 34], ["ellipsis:...", "T"], 2], ["Delete", [":::", 3, 26, 3, 27]], ["Delete", ["slice", 3, 26, 3, 27]]] | matsuken92/scikit-image@051c54c577b32f76f88fcd7d894767bc48b81bad | Fix indexing bug in freeimage plugin | [
{
"sha": "187264e6512db865e507a4ff766d5894dc465804",
"filename": "skimage/io/_plugins/freeimage_plugin.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/051c54c577b32f76f88fcd7d894767bc48b81bad/skimage%2Fio%2F_plugins%2Ffreeimage_plugin.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/051c54c577b32f76f88fcd7d894767bc48b81bad/skimage%2Fio%2F_plugins%2Ffreeimage_plugin.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fio%2F_plugins%2Ffreeimage_plugin.py?ref=051c54c577b32f76f88fcd7d894767bc48b81bad",
"patch": "@@ -672,7 +672,7 @@ def _array_to_bitmap(array):\n raise RuntimeError('Could not allocate image for storage')\n try:\n def n(arr): # normalise to freeimage's in-memory format\n- return arr.T[:, ::-1]\n+ return arr.T[..., ::-1]\n \n wrapped_array = _wrap_bitmap_bits_in_array(bitmap, w_shape, dtype)\n # swizzle the color components and flip the scanlines to go to"
}
] |
scikit-image | 8758ce9f93421d4aff8450cd88a5bb001af41db8 | 53760e3d8710429da1e9611645248d936dbb2455 | skimage/io/_plugins/pil_plugin.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -34,7 +34,7 @@ def imread(fname, dtype=None):
im.getdata()[0]
except IOError:
site = "http://pillow.readthedocs.org/en/latest/installation.html#external-libraries"
- raise ValueError('Could not load "%s"\nPlease see documentation at %s' % (fname, site))
+ raise ValueError('Could not load "%s"\nPlease see documentation at: %s' % (fname, site))
else:
return pil_to_ndarray(im, dtype)
| raise ValueError ( 'Could not load "%s"\nPlease see documentation at %s' % ( fname , site ) ) | raise ValueError ( 'Could not load "%s"\nPlease see documentation at: %s' % ( fname , site ) ) | CHANGE_BINARY_OPERAND | [["Update", ["string:'Could not load \"%s\"\\nPlease see documentation at %s'", 3, 26, 3, 80], "'Could not load \"%s\"\\nPlease see documentation at: %s'"]] | matsuken92/scikit-image@8758ce9f93421d4aff8450cd88a5bb001af41db8 | Minor formatting of error message | [
{
"sha": "f45084ce5571eb37e1bf2b7a3d9fe62ec58241b4",
"filename": "skimage/io/_plugins/pil_plugin.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/8758ce9f93421d4aff8450cd88a5bb001af41db8/skimage%2Fio%2F_plugins%2Fpil_plugin.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/8758ce9f93421d4aff8450cd88a5bb001af41db8/skimage%2Fio%2F_plugins%2Fpil_plugin.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fio%2F_plugins%2Fpil_plugin.py?ref=8758ce9f93421d4aff8450cd88a5bb001af41db8",
"patch": "@@ -34,7 +34,7 @@ def imread(fname, dtype=None):\n im.getdata()[0]\n except IOError:\n site = \"http://pillow.readthedocs.org/en/latest/installation.html#external-libraries\"\n- raise ValueError('Could not load \"%s\"\\nPlease see documentation at %s' % (fname, site))\n+ raise ValueError('Could not load \"%s\"\\nPlease see documentation at: %s' % (fname, site))\n else:\n return pil_to_ndarray(im, dtype)\n "
}
] |
scikit-image | 04f91021a97e0218e62fe516cd185d476d04da42 | d2aaae40c8c29b371a5f5eccd0ea7c26bb876e9d | skimage/feature/template.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -103,7 +103,7 @@ def match_template(image, template, pad_input=False, mode='constant',
- assert_nD(ndim=(2, 3))
+ assert_nD(image, ndim=(2, 3))
if image.ndim < template.ndim:
raise ValueError("Dimensionality of template must be less than or "
| assert_nD ( ndim = ( 2 , 3 ) ) | assert_nD ( image , ndim = ( 2 , 3 ) ) | SAME_FUNCTION_MORE_ARGS | [["Insert", ["argument_list", 0, 14, 0, 27], ["identifier:image", "T"], 1], ["Insert", ["argument_list", 0, 14, 0, 27], [",:,", "T"], 2]] | matsuken92/scikit-image@04f91021a97e0218e62fe516cd185d476d04da42 | Fix assert_nD call in template.py | [
{
"sha": "32940e514dfd78d791f5176de2291d6c9e401cfa",
"filename": "skimage/feature/template.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/04f91021a97e0218e62fe516cd185d476d04da42/skimage%2Ffeature%2Ftemplate.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/04f91021a97e0218e62fe516cd185d476d04da42/skimage%2Ffeature%2Ftemplate.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffeature%2Ftemplate.py?ref=04f91021a97e0218e62fe516cd185d476d04da42",
"patch": "@@ -103,7 +103,7 @@ def match_template(image, template, pad_input=False, mode='constant',\n [ 0. , 0. , 0. , 0.125, -1. , 0.125],\n [ 0. , 0. , 0. , 0.125, 0.125, 0.125]], dtype=float32)\n \"\"\"\n- assert_nD(ndim=(2, 3))\n+ assert_nD(image, ndim=(2, 3))\n \n if image.ndim < template.ndim:\n raise ValueError(\"Dimensionality of template must be less than or \""
}
] |
scikit-image | bcac1b1a6dc200f64df0b92eda583286599388d4 | 04f91021a97e0218e62fe516cd185d476d04da42 | skimage/feature/tests/test_canny.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -60,7 +60,7 @@ class TestCanny(unittest.TestCase):
self.assertTrue(point_count < 1600)
def test_image_shape(self):
- self.assertRaises(TypeError, F.canny, np.zeros((20, 20, 20)), 4, 0, 0)
+ self.assertRaises(ValueError, F.canny, np.zeros((20, 20, 20)), 4, 0, 0)
def test_mask_none(self):
result1 = F.canny(np.zeros((20, 20)), 4, 0, 0, np.ones((20, 20), bool))
| self . assertRaises ( TypeError , F . canny , np . zeros ( ( 20 , 20 , 20 ) ) , 4 , 0 , 0 ) | self . assertRaises ( ValueError , F . canny , np . zeros ( ( 20 , 20 , 20 ) ) , 4 , 0 , 0 ) | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:TypeError", 3, 27, 3, 36], "ValueError"]] | matsuken92/scikit-image@bcac1b1a6dc200f64df0b92eda583286599388d4 | Fix canny test to reflect new error type. | [
{
"sha": "400a7f70036380d0fe7f60e7cef9271950486510",
"filename": "skimage/feature/tests/test_canny.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/bcac1b1a6dc200f64df0b92eda583286599388d4/skimage%2Ffeature%2Ftests%2Ftest_canny.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/bcac1b1a6dc200f64df0b92eda583286599388d4/skimage%2Ffeature%2Ftests%2Ftest_canny.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffeature%2Ftests%2Ftest_canny.py?ref=bcac1b1a6dc200f64df0b92eda583286599388d4",
"patch": "@@ -60,7 +60,7 @@ def test_01_02_circle_with_noise(self):\n self.assertTrue(point_count < 1600)\n \n def test_image_shape(self):\n- self.assertRaises(TypeError, F.canny, np.zeros((20, 20, 20)), 4, 0, 0)\n+ self.assertRaises(ValueError, F.canny, np.zeros((20, 20, 20)), 4, 0, 0)\n \n def test_mask_none(self):\n result1 = F.canny(np.zeros((20, 20)), 4, 0, 0, np.ones((20, 20), bool))"
}
] |
scikit-image | c92f54c54daf7c5305c8be3bd83d16ac7151c4ba | d440cade5110f88dc8925e8c137d7275b6756194 | setup.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -150,7 +150,7 @@ if __name__ == "__main__":
configuration=configuration,
install_requires=[
- "six>=%s" % DEPENDENCIES['six']
+ "six>=%s" % '.'.join(str(d) for d in DEPENDENCIES['six'])
],
packages=setuptools.find_packages(exclude=['doc']),
include_package_data=True,
| configuration = configuration , install_requires = [ "six>=%s" % DEPENDENCIES [ 'six' ] ] , | configuration = configuration , install_requires = [ "six>=%s" % '.' . join ( str ( d ) for d in DEPENDENCIES [ 'six' ] ) ] , | CHANGE_BINARY_OPERAND | [["Insert", ["binary_operator", 3, 13, 3, 44], ["call", "N0"], 2], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["generator_expression", "N2"], 1], ["Insert", "N1", ["string:'.'", "T"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:join", "T"], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Insert", "N2", ["call", "N3"], 1], ["Insert", "N2", ["for_in_clause", "N4"], 2], ["Insert", "N2", ["):)", "T"], 3], ["Insert", "N3", ["identifier:str", "T"], 0], ["Insert", "N3", ["argument_list", "N5"], 1], ["Insert", "N4", ["for:for", "T"], 0], ["Insert", "N4", ["identifier:d", "T"], 1], ["Insert", "N4", ["in:in", "T"], 2], ["Move", "N4", ["subscript", 3, 25, 3, 44], 3], ["Insert", "N5", ["(:(", "T"], 0], ["Insert", "N5", ["identifier:d", "T"], 1], ["Insert", "N5", ["):)", "T"], 2]] | matsuken92/scikit-image@c92f54c54daf7c5305c8be3bd83d16ac7151c4ba | Fix install_requires string formatting | [
{
"sha": "38288356bd2b177aa5885e9d04c65310d9cb3811",
"filename": "setup.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/c92f54c54daf7c5305c8be3bd83d16ac7151c4ba/setup.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/c92f54c54daf7c5305c8be3bd83d16ac7151c4ba/setup.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/setup.py?ref=c92f54c54daf7c5305c8be3bd83d16ac7151c4ba",
"patch": "@@ -150,7 +150,7 @@ def check_requirements():\n \n configuration=configuration,\n install_requires=[\n- \"six>=%s\" % DEPENDENCIES['six']\n+ \"six>=%s\" % '.'.join(str(d) for d in DEPENDENCIES['six'])\n ],\n packages=setuptools.find_packages(exclude=['doc']),\n include_package_data=True,"
}
] |
scikit-image | 75448b8579aa042b28bf224cf8f8dea30e005c81 | c92f54c54daf7c5305c8be3bd83d16ac7151c4ba | setup.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -31,7 +31,7 @@ from distutils.command.build_py import build_py
# These are manually checked.
# These packages are sometimes installed outside of the setuptools scope
DEPENDENCIES = {}
-with open('requirements.txt') as fid:
+with open('requirements.txt', 'rb') as fid:
data = fid.read().decode('utf-8', 'replace')
for line in data.splitlines():
pkg, _, version_info = line.partition('>=')
| with open ( 'requirements.txt' ) as fid : data = fid . read ( ) . decode ( 'utf-8' , 'replace' ) | with open ( 'requirements.txt' , 'rb' ) as fid : data = fid . read ( ) . decode ( 'utf-8' , 'replace' ) | SAME_FUNCTION_MORE_ARGS | [["Insert", ["argument_list", 3, 10, 3, 30], [",:,", "T"], 2], ["Insert", ["argument_list", 3, 10, 3, 30], ["string:'rb'", "T"], 3]] | matsuken92/scikit-image@75448b8579aa042b28bf224cf8f8dea30e005c81 | Fix python 3 unicode error | [
{
"sha": "ec39034cd1e1215b83bff81e3eb98f3ea02cad0f",
"filename": "setup.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/75448b8579aa042b28bf224cf8f8dea30e005c81/setup.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/75448b8579aa042b28bf224cf8f8dea30e005c81/setup.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/setup.py?ref=75448b8579aa042b28bf224cf8f8dea30e005c81",
"patch": "@@ -31,7 +31,7 @@\n # These are manually checked.\n # These packages are sometimes installed outside of the setuptools scope\n DEPENDENCIES = {}\n-with open('requirements.txt') as fid:\n+with open('requirements.txt', 'rb') as fid:\n data = fid.read().decode('utf-8', 'replace')\n for line in data.splitlines():\n pkg, _, version_info = line.partition('>=')"
}
] |
scikit-image | 9ea43d777ba351b1c6aaf89d65a2185c1c60c6b2 | 124db3274fb9099bc1f15521c9a92d5fc6773611 | skimage/draw/draw.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -63,7 +63,7 @@ def ellipse(cy, cx, yradius, xradius, shape=None):
return _ellipse_in_shape(shape, center, radiuses)
else:
# rounding here is necessary to avoid rounding issues later
- upper_left = np.floor(center - radiuses)
+ upper_left = np.floor(center - radiuses).astype(int)
shifted_center = center - upper_left
| else : upper_left = np . floor ( center - radiuses ) | else : upper_left = np . floor ( center - radiuses ) . astype ( int ) | ADD_METHOD_CALL | [["Insert", ["call", 3, 22, 3, 49], ["attribute", "N0"], 0], ["Insert", ["call", 3, 22, 3, 49], ["argument_list", "N1"], 1], ["Move", "N0", ["call", 3, 22, 3, 49], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:astype", "T"], 2], ["Insert", "N1", ["(:(", "T"], 0], ["Insert", "N1", ["identifier:int", "T"], 1], ["Insert", "N1", ["):)", "T"], 2]] | matsuken92/scikit-image@9ea43d777ba351b1c6aaf89d65a2185c1c60c6b2 | Avoid type incompatibility warnings | [
{
"sha": "01fb4bf3f1b1e8d5e46116a3d91cfdd66328aded",
"filename": "skimage/draw/draw.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/9ea43d777ba351b1c6aaf89d65a2185c1c60c6b2/skimage%2Fdraw%2Fdraw.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/9ea43d777ba351b1c6aaf89d65a2185c1c60c6b2/skimage%2Fdraw%2Fdraw.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fdraw%2Fdraw.py?ref=9ea43d777ba351b1c6aaf89d65a2185c1c60c6b2",
"patch": "@@ -63,7 +63,7 @@ def ellipse(cy, cx, yradius, xradius, shape=None):\n return _ellipse_in_shape(shape, center, radiuses)\n else:\n # rounding here is necessary to avoid rounding issues later\n- upper_left = np.floor(center - radiuses)\n+ upper_left = np.floor(center - radiuses).astype(int)\n \n shifted_center = center - upper_left\n "
}
] |
scikit-image | 558dfad3f0456b0e14474aab397d0e43df1ca077 | 1ae929224e5b7520c8ddbce4888cb878cdb22dcb | setup.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -107,7 +107,7 @@ def check_requirements():
package_name = 'PIL.Image'
try:
package = __import__(package_name,
- fromlist=[package_name.split('.')[-1]])
+ fromlist=[package_name.rpartition('.')[0]])
except ImportError:
dep_error = True
else:
| package = __import__ ( package_name , fromlist = [ package_name . split ( '.' ) [ - 1 ] ] ) | package = __import__ ( package_name , fromlist = [ package_name . rpartition ( '.' ) [ 0 ] ] ) | SINGLE_STMT | [["Insert", ["subscript", 3, 27, 3, 54], ["integer:0", "T"], 2], ["Update", ["identifier:split", 3, 40, 3, 45], "rpartition"], ["Delete", ["-:-", 3, 51, 3, 52]], ["Delete", ["integer:1", 3, 52, 3, 53]], ["Delete", ["unary_operator", 3, 51, 3, 53]]] | matsuken92/scikit-image@558dfad3f0456b0e14474aab397d0e43df1ca077 | Fix __import__ fromlist | [
{
"sha": "856a97107d24065edce4269ae288d0d06832b92c",
"filename": "setup.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/558dfad3f0456b0e14474aab397d0e43df1ca077/setup.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/558dfad3f0456b0e14474aab397d0e43df1ca077/setup.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/setup.py?ref=558dfad3f0456b0e14474aab397d0e43df1ca077",
"patch": "@@ -107,7 +107,7 @@ def check_requirements():\n package_name = 'PIL.Image'\n try:\n package = __import__(package_name,\n- fromlist=[package_name.split('.')[-1]])\n+ fromlist=[package_name.rpartition('.')[0]])\n except ImportError:\n dep_error = True\n else:"
}
] |
scikit-image | 12dab41c3988ce6a5a5383b405e1e20c8fe2b1ad | 39267d103cd9b8f4ba9cf2ebfc9729141b2624e2 | skimage/morphology/selem.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -115,7 +115,7 @@ def disk(radius, dtype=np.uint8):
L = np.arange(-radius, radius + 1)
X, Y = np.meshgrid(L, L)
- return np.array((X ** 2 + Y ** 2) <= radius ** 2, dtype=np.uint8)
+ return np.array((X ** 2 + Y ** 2) <= radius ** 2, dtype=dtype)
def cube(width, dtype=np.uint8):
| return np . array ( ( X ** 2 + Y ** 2 ) <= radius ** 2 , dtype = np . uint8 ) | return np . array ( ( X ** 2 + Y ** 2 ) <= radius ** 2 , dtype = dtype ) | SINGLE_STMT | [["Update", ["identifier:np", 2, 61, 2, 63], "dtype"], ["Move", ["keyword_argument", 2, 55, 2, 69], ["identifier:np", 2, 61, 2, 63], 2], ["Delete", [".:.", 2, 63, 2, 64]], ["Delete", ["identifier:uint8", 2, 64, 2, 69]], ["Delete", ["attribute", 2, 61, 2, 69]]] | matsuken92/scikit-image@12dab41c3988ce6a5a5383b405e1e20c8fe2b1ad | CLN: Correct dtype typo | [
{
"sha": "21200e1131e2d9d3e9595350c9e13a1cc3a01a88",
"filename": "skimage/morphology/selem.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/12dab41c3988ce6a5a5383b405e1e20c8fe2b1ad/skimage%2Fmorphology%2Fselem.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/12dab41c3988ce6a5a5383b405e1e20c8fe2b1ad/skimage%2Fmorphology%2Fselem.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fmorphology%2Fselem.py?ref=12dab41c3988ce6a5a5383b405e1e20c8fe2b1ad",
"patch": "@@ -115,7 +115,7 @@ def disk(radius, dtype=np.uint8):\n \"\"\"\n L = np.arange(-radius, radius + 1)\n X, Y = np.meshgrid(L, L)\n- return np.array((X ** 2 + Y ** 2) <= radius ** 2, dtype=np.uint8)\n+ return np.array((X ** 2 + Y ** 2) <= radius ** 2, dtype=dtype)\n \n \n def cube(width, dtype=np.uint8):"
}
] |
scikit-image | 7d171a8e37999725ee1a8c79fcd56a488dfcfffd | 6cff910f674d9dfd9dce9c37bc856d67187a6017 | setup.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -142,11 +142,11 @@ if __name__ == "__main__":
configuration=configuration,
install_requires=[
- "six>=%s" % '.'.join(str(d) for d in DEPENDENCIES['six'])
+ "six>=%s" % DEPENDENCIES['six']
],
packages=setuptools.find_packages(exclude=['doc']),
include_package_data=True,
- zip_safe=False, # the package can run out of an .egg file
+ zip_safe=False, # the package can run out of an .egg file
entry_points={
'console_scripts': ['skivi = skimage.scripts.skivi:main'],
| configuration = configuration , install_requires = [ "six>=%s" % '.' . join ( str ( d ) for d in DEPENDENCIES [ 'six' ] ) ] , | configuration = configuration , install_requires = [ "six>=%s" % DEPENDENCIES [ 'six' ] ] , | CHANGE_BINARY_OPERAND | [["Move", ["binary_operator", 3, 13, 3, 70], ["subscript", 3, 50, 3, 69], 2], ["Delete", ["string:'.'", 3, 25, 3, 28]], ["Delete", [".:.", 3, 28, 3, 29]], ["Delete", ["identifier:join", 3, 29, 3, 33]], ["Delete", ["attribute", 3, 25, 3, 33]], ["Delete", ["(:(", 3, 33, 3, 34]], ["Delete", ["identifier:str", 3, 34, 3, 37]], ["Delete", ["(:(", 3, 37, 3, 38]], ["Delete", ["identifier:d", 3, 38, 3, 39]], ["Delete", ["):)", 3, 39, 3, 40]], ["Delete", ["argument_list", 3, 37, 3, 40]], ["Delete", ["call", 3, 34, 3, 40]], ["Delete", ["for:for", 3, 41, 3, 44]], ["Delete", ["identifier:d", 3, 45, 3, 46]], ["Delete", ["in:in", 3, 47, 3, 49]], ["Delete", ["for_in_clause", 3, 41, 3, 69]], ["Delete", ["):)", 3, 69, 3, 70]], ["Delete", ["generator_expression", 3, 33, 3, 70]], ["Delete", ["call", 3, 25, 3, 70]]] | matsuken92/scikit-image@7d171a8e37999725ee1a8c79fcd56a488dfcfffd | Fix install_requires | [
{
"sha": "e96fe71e107d959e1db0d037c3bc20709b09da05",
"filename": "setup.py",
"status": "modified",
"additions": 2,
"deletions": 2,
"changes": 4,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/7d171a8e37999725ee1a8c79fcd56a488dfcfffd/setup.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/7d171a8e37999725ee1a8c79fcd56a488dfcfffd/setup.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/setup.py?ref=7d171a8e37999725ee1a8c79fcd56a488dfcfffd",
"patch": "@@ -142,11 +142,11 @@ def check_requirements():\n \n configuration=configuration,\n install_requires=[\n- \"six>=%s\" % '.'.join(str(d) for d in DEPENDENCIES['six'])\n+ \"six>=%s\" % DEPENDENCIES['six']\n ],\n packages=setuptools.find_packages(exclude=['doc']),\n include_package_data=True,\n- zip_safe=False, # the package can run out of an .egg file\n+ zip_safe=False, # the package can run out of an .egg file\n \n entry_points={\n 'console_scripts': ['skivi = skimage.scripts.skivi:main'],"
}
] |
scikit-image | 88719b33402986137d070d9dd3dac2bc86de4932 | 50aff0058a0b4801f0ec83ce442279fb211ea97d | skimage/external/setup.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -11,7 +11,7 @@ def configuration(parent_package='', top_path=None):
config = Configuration('external', parent_package, top_path)
config.add_extension('tifffile._tifffile',
- sources=['tifffile/_tifffile.c'],
+ sources=['tifffile/tifffile.c'],
include_dirs=[get_numpy_include_dirs()])
return config
| config . add_extension ( 'tifffile._tifffile' , sources = [ 'tifffile/_tifffile.c' ] , include_dirs = [ get_numpy_include_dirs ( ) ] ) | config . add_extension ( 'tifffile._tifffile' , sources = [ 'tifffile/tifffile.c' ] , include_dirs = [ get_numpy_include_dirs ( ) ] ) | CHANGE_STRING_LITERAL | [["Update", ["string:'tifffile/_tifffile.c'", 3, 35, 3, 57], "'tifffile/tifffile.c'"]] | matsuken92/scikit-image@88719b33402986137d070d9dd3dac2bc86de4932 | Fix path to tifffile.c | [
{
"sha": "343c4d549eade91a248bc8dd5842bf1799447fba",
"filename": "skimage/external/setup.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/88719b33402986137d070d9dd3dac2bc86de4932/skimage%2Fexternal%2Fsetup.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/88719b33402986137d070d9dd3dac2bc86de4932/skimage%2Fexternal%2Fsetup.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fexternal%2Fsetup.py?ref=88719b33402986137d070d9dd3dac2bc86de4932",
"patch": "@@ -11,7 +11,7 @@ def configuration(parent_package='', top_path=None):\n config = Configuration('external', parent_package, top_path)\n \n config.add_extension('tifffile._tifffile',\n- sources=['tifffile/_tifffile.c'],\n+ sources=['tifffile/tifffile.c'],\n include_dirs=[get_numpy_include_dirs()])\n return config\n "
}
] |
scikit-image | cb1a26ce2ec2ce8b115682b0adcadc39dd7c83d5 | e557b92e800f348038df99fd7dac506627bb365c | skimage/filter/__init__.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -19,7 +19,7 @@ denoise_tv_chambolle = deprecated('skimage.restoration.denoise_tv_chambolle')\
(restoration.denoise_tv_chambolle)
# Backward compatibility v<0.11
-@deprecated
+@deprecated('skimage.feature.canny')
def canny(*args, **kwargs):
# Hack to avoid circular import
from skimage.feature._canny import canny as canny_
| @ deprecated def canny ( * args , ** kwargs ) : from skimage . feature . _canny import canny as canny_ | @ deprecated ( 'skimage.feature.canny' ) def canny ( * args , ** kwargs ) : from skimage . feature . _canny import canny as canny_ | SINGLE_STMT | [["Insert", ["decorator", 3, 1, 3, 12], ["call", "N0"], 1], ["Move", "N0", ["identifier:deprecated", 3, 2, 3, 12], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Insert", "N1", ["string:'skimage.feature.canny'", "T"], 1], ["Insert", "N1", ["):)", "T"], 2]] | matsuken92/scikit-image@cb1a26ce2ec2ce8b115682b0adcadc39dd7c83d5 | Fix deprecation of canny function | [
{
"sha": "e5b58447b2e0353493973a29af624745196be515",
"filename": "skimage/filter/__init__.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/cb1a26ce2ec2ce8b115682b0adcadc39dd7c83d5/skimage%2Ffilter%2F__init__.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/cb1a26ce2ec2ce8b115682b0adcadc39dd7c83d5/skimage%2Ffilter%2F__init__.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffilter%2F__init__.py?ref=cb1a26ce2ec2ce8b115682b0adcadc39dd7c83d5",
"patch": "@@ -19,7 +19,7 @@\n (restoration.denoise_tv_chambolle)\n \n # Backward compatibility v<0.11\n-@deprecated\n+@deprecated('skimage.feature.canny')\n def canny(*args, **kwargs):\n # Hack to avoid circular import\n from skimage.feature._canny import canny as canny_"
}
] |
folium | 891e00f4181b1df324916cbe815cf4ea77bc1def | fed24a4f49368b4ac1d938d777c42bba7d5c56db | tests/test_features.py | https://github.com/matsuken92/folium | true | false | true | @@ -90,7 +90,7 @@ def test_marker_popups():
m._repr_html_()
def test_polyline_popups():
- m = folium.Map([43,-100], zoom_start=4)
+ m = Map([43,-100], zoom_start=4)
features.PolyLine([[40,-80],[45,-80]], popup="PolyLine").add_to(m)
features.PolyLine([[40,-90],[45,-90]], popup=Popup("PolyLine")).add_to(m)
features.MultiPolyLine([[[40,-110],[45,-110]]], popup="MultiPolyLine").add_to(m)
| m = folium . Map ( [ 43 , - 100 ] , zoom_start = 4 ) | m = Map ( [ 43 , - 100 ] , zoom_start = 4 ) | SINGLE_STMT | [["Move", ["call", 3, 9, 3, 44], ["identifier:Map", 3, 16, 3, 19], 0], ["Delete", ["identifier:folium", 3, 9, 3, 15]], ["Delete", [".:.", 3, 15, 3, 16]], ["Delete", ["attribute", 3, 9, 3, 19]]] | matsuken92/folium@891e00f4181b1df324916cbe815cf4ea77bc1def | Bugfix in test_features | [
{
"sha": "466006a2164dcea7722e4dba2e58377ca838cbf6",
"filename": "tests/test_features.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/folium/blob/891e00f4181b1df324916cbe815cf4ea77bc1def/tests%2Ftest_features.py",
"raw_url": "https://github.com/matsuken92/folium/raw/891e00f4181b1df324916cbe815cf4ea77bc1def/tests%2Ftest_features.py",
"contents_url": "https://api.github.com/repos/matsuken92/folium/contents/tests%2Ftest_features.py?ref=891e00f4181b1df324916cbe815cf4ea77bc1def",
"patch": "@@ -90,7 +90,7 @@ def test_marker_popups():\n m._repr_html_()\n \n def test_polyline_popups():\n- m = folium.Map([43,-100], zoom_start=4)\n+ m = Map([43,-100], zoom_start=4)\n features.PolyLine([[40,-80],[45,-80]], popup=\"PolyLine\").add_to(m)\n features.PolyLine([[40,-90],[45,-90]], popup=Popup(\"PolyLine\")).add_to(m)\n features.MultiPolyLine([[[40,-110],[45,-110]]], popup=\"MultiPolyLine\").add_to(m)"
}
] |
folium | 1cd4beb6b9e65391a405f5db7fa8fe9f078cefcc | 49fa206de52f93aef9220153f215ee8a9bcc3400 | tests/test_folium.py | https://github.com/matsuken92/folium | true | false | true | @@ -396,7 +396,7 @@ class TestFolium(object):
# Verify the geo_json object
obj_temp = jinja2.Template("""
- var {{ this.get_name() }} = L.geoJson({{ json.dumps(this.data) }})
+ var {{ this.get_name() }} = L.geoJson({{ this.style_data() }})
.addTo({{ this._parent.get_name() }});
{{ this.get_name() }}.setStyle(function(feature) {return feature.properties.style;});
""")
| obj_temp = jinja2 . Template ( """
var {{ this.get_name() }} = L.geoJson({{ json.dumps(this.data) }})
.addTo({{ this._parent.get_name() }});
{{ this.get_name() }}.setStyle(function(feature) {return feature.properties.style;});
""" ) | obj_temp = jinja2 . Template ( """
var {{ this.get_name() }} = L.geoJson({{ this.style_data() }})
.addTo({{ this._parent.get_name() }});
{{ this.get_name() }}.setStyle(function(feature) {return feature.properties.style;});
""" ) | CHANGE_STRING_LITERAL | [["Update", ["string:\"\"\"\n var {{ this.get_name() }} = L.geoJson({{ json.dumps(this.data) }})\n .addTo({{ this._parent.get_name() }});\n {{ this.get_name() }}.setStyle(function(feature) {return feature.properties.style;});\n \"\"\"", 2, 36, 6, 20], "\"\"\"\n var {{ this.get_name() }} = L.geoJson({{ this.style_data() }})\n .addTo({{ this._parent.get_name() }});\n {{ this.get_name() }}.setStyle(function(feature) {return feature.properties.style;});\n \"\"\""]] | matsuken92/folium@1cd4beb6b9e65391a405f5db7fa8fe9f078cefcc | Fix test_geo_json_str | [
{
"sha": "99e626fabf614507cf6df56c39f233d8f3da2366",
"filename": "tests/test_folium.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/folium/blob/1cd4beb6b9e65391a405f5db7fa8fe9f078cefcc/tests%2Ftest_folium.py",
"raw_url": "https://github.com/matsuken92/folium/raw/1cd4beb6b9e65391a405f5db7fa8fe9f078cefcc/tests%2Ftest_folium.py",
"contents_url": "https://api.github.com/repos/matsuken92/folium/contents/tests%2Ftest_folium.py?ref=1cd4beb6b9e65391a405f5db7fa8fe9f078cefcc",
"patch": "@@ -396,7 +396,7 @@ def test_geo_json_str(self):\n \n # Verify the geo_json object\n obj_temp = jinja2.Template(\"\"\"\n- var {{ this.get_name() }} = L.geoJson({{ json.dumps(this.data) }})\n+ var {{ this.get_name() }} = L.geoJson({{ this.style_data() }})\n .addTo({{ this._parent.get_name() }});\n {{ this.get_name() }}.setStyle(function(feature) {return feature.properties.style;});\n \"\"\")"
}
] |
folium | daf7a4422f7a7c0c3eeb257c009bd7c02d10a785 | a235897d3614a0649d72865497cb19b7bf253615 | folium/map.py | https://github.com/matsuken92/folium | true | false | true | @@ -331,7 +331,7 @@ class FeatureGroup(Layer):
def __init__(self, name=None, overlay=True, control=True):
- super(FeatureGroup, self).__init__(overlay=overlay, control=control)
+ super(FeatureGroup, self).__init__(overlay=overlay, control=control, name=name)
self._name = 'FeatureGroup'
self.tile_name = name if name is not None else self.get_name()
| super ( FeatureGroup , self ) . __init__ ( overlay = overlay , control = control ) | super ( FeatureGroup , self ) . __init__ ( overlay = overlay , control = control , name = name ) | SAME_FUNCTION_MORE_ARGS | [["Insert", ["argument_list", 1, 43, 1, 77], [",:,", "T"], 4], ["Insert", ["argument_list", 1, 43, 1, 77], ["keyword_argument", "N0"], 5], ["Insert", "N0", ["identifier:name", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["identifier:name", "T"], 2]] | matsuken92/folium@daf7a4422f7a7c0c3eeb257c009bd7c02d10a785 | Fix #371 | [
{
"sha": "e84711df32573cd1c906fbbf5fba21141f832f6d",
"filename": "folium/map.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/folium/blob/daf7a4422f7a7c0c3eeb257c009bd7c02d10a785/folium%2Fmap.py",
"raw_url": "https://github.com/matsuken92/folium/raw/daf7a4422f7a7c0c3eeb257c009bd7c02d10a785/folium%2Fmap.py",
"contents_url": "https://api.github.com/repos/matsuken92/folium/contents/folium%2Fmap.py?ref=daf7a4422f7a7c0c3eeb257c009bd7c02d10a785",
"patch": "@@ -331,7 +331,7 @@ class FeatureGroup(Layer):\n LayerControls) or a base layer (ticked with a radio button).\n \"\"\"\n def __init__(self, name=None, overlay=True, control=True):\n- super(FeatureGroup, self).__init__(overlay=overlay, control=control)\n+ super(FeatureGroup, self).__init__(overlay=overlay, control=control, name=name)\n self._name = 'FeatureGroup'\n \n self.tile_name = name if name is not None else self.get_name()"
}
] |
python_renshu | 2379307611b5d996f5d5b8c4cf30ae73f19e1d3b | 383a6dddc8b35d4467bc02a59ee4342acfa80e06 | recursion/stack_frame.py | https://github.com/CheBlankenship/python_renshu | true | false | true | @@ -21,7 +21,7 @@ def to_str(n, base):
#
res = ""
while not stk.is_empty():
- res = stk
+ res = res + str(stk.pop())
return res
| res = stk | res = res + str ( stk . pop ( ) ) | SINGLE_STMT | [["Insert", ["assignment", 3, 9, 3, 18], ["binary_operator", "N0"], 2], ["Insert", "N0", ["identifier:res", "T"], 0], ["Insert", "N0", ["+:+", "T"], 1], ["Insert", "N0", ["call", "N1"], 2], ["Insert", "N1", ["identifier:str", "T"], 0], ["Insert", "N1", ["argument_list", "N2"], 1], ["Insert", "N2", ["(:(", "T"], 0], ["Insert", "N2", ["call", "N3"], 1], ["Insert", "N2", ["):)", "T"], 2], ["Insert", "N3", ["attribute", "N4"], 0], ["Insert", "N3", ["argument_list", "N5"], 1], ["Move", "N4", ["identifier:stk", 3, 15, 3, 18], 0], ["Insert", "N4", [".:.", "T"], 1], ["Insert", "N4", ["identifier:pop", "T"], 2], ["Insert", "N5", ["(:(", "T"], 0], ["Insert", "N5", ["):)", "T"], 1]] | CheBlankenship/python_renshu@2379307611b5d996f5d5b8c4cf30ae73f19e1d3b | null | null |
GVRDGrunt | 40372ba146c3f069c85138708046220cecb87356 | 6879db5a1bf62687faabc37760ce33e6681d4e32 | bot/role_reaction_subscription_cog.py | https://github.com/rhliang/GVRDGrunt | true | false | true | @@ -225,7 +225,7 @@ class RoleReactionSubscriptionCog():
if payload.user_id == self.bot.user.id:
- pass
+ return
guild = self.bot.get_guild(payload.guild_id)
subscription_info = self.db.get_subscription_info_by_message_id(guild, payload.message_id)
# Do nothing if the guild doesn't have subscription for this role configured.
| pass | return | SINGLE_TOKEN | [["Insert", ["block", 1, 13, 1, 17], ["return_statement", "N0"], 0], ["Insert", "N0", ["return:return", "T"], 0], ["Delete", ["pass:pass", 1, 13, 1, 17]], ["Delete", ["pass_statement", 1, 13, 1, 17]]] | rhliang/GVRDGrunt@40372ba146c3f069c85138708046220cecb87356 | Fixed a minor bug where the bot assigns itself channel roles through reactions. | [
{
"sha": "0b1f9592bb276d8275270a7aec142206649dbc5a",
"filename": "bot/role_reaction_subscription_cog.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rhliang/GVRDGrunt/blob/40372ba146c3f069c85138708046220cecb87356/bot%2Frole_reaction_subscription_cog.py",
"raw_url": "https://github.com/rhliang/GVRDGrunt/raw/40372ba146c3f069c85138708046220cecb87356/bot%2Frole_reaction_subscription_cog.py",
"contents_url": "https://api.github.com/repos/rhliang/GVRDGrunt/contents/bot%2Frole_reaction_subscription_cog.py?ref=40372ba146c3f069c85138708046220cecb87356",
"patch": "@@ -225,7 +225,7 @@ async def reaction_clicked(self, payload):\n :return:\n \"\"\"\n if payload.user_id == self.bot.user.id:\n- pass\n+ return\n guild = self.bot.get_guild(payload.guild_id)\n subscription_info = self.db.get_subscription_info_by_message_id(guild, payload.message_id)\n # Do nothing if the guild doesn't have subscription for this role configured."
}
] |
GVRDGrunt | b5dcbf94474e33a96f6fbf6e983b1645356832fd | 73191ffcfe4d36b214b2411ec71d244385b153ea | db_migration_scripts/raid_fyi_migration.py | https://github.com/rhliang/GVRDGrunt | true | false | true | @@ -56,7 +56,7 @@ def get_all_fyi_configuration(conn):
"guild_id": {"N": str(guild_id)},
"config_channel_message": {"S": "chatchannel{}".format(chat_channel_id)},
"relay_channel": {"N": str(fyi_channel_id)},
- "timeout_in_hours": {"NULL": True}
+ "timeout_in_hours": {"N": 24}
}
guild_channel_mappings.append(channel_mapping_config)
| { "NULL" : True } | { "N" : 24 } | SINGLE_STMT | [["Update", ["string:\"NULL\"", 3, 42, 3, 48], "\"N\""], ["Insert", ["pair", 3, 42, 3, 54], ["integer:24", "T"], 2], ["Delete", ["true:True", 3, 50, 3, 54]]] | rhliang/GVRDGrunt@b5dcbf94474e33a96f6fbf6e983b1645356832fd | More sensible default values in the FYI migration script. | [
{
"sha": "3aa4b7a1674a8c04069864126f5fda8f06fd99e9",
"filename": "db_migration_scripts/raid_fyi_migration.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rhliang/GVRDGrunt/blob/b5dcbf94474e33a96f6fbf6e983b1645356832fd/db_migration_scripts%2Fraid_fyi_migration.py",
"raw_url": "https://github.com/rhliang/GVRDGrunt/raw/b5dcbf94474e33a96f6fbf6e983b1645356832fd/db_migration_scripts%2Fraid_fyi_migration.py",
"contents_url": "https://api.github.com/repos/rhliang/GVRDGrunt/contents/db_migration_scripts%2Fraid_fyi_migration.py?ref=b5dcbf94474e33a96f6fbf6e983b1645356832fd",
"patch": "@@ -56,7 +56,7 @@ def get_all_fyi_configuration(conn):\n \"guild_id\": {\"N\": str(guild_id)},\n \"config_channel_message\": {\"S\": \"chatchannel{}\".format(chat_channel_id)},\n \"relay_channel\": {\"N\": str(fyi_channel_id)},\n- \"timeout_in_hours\": {\"NULL\": True}\n+ \"timeout_in_hours\": {\"N\": 24}\n }\n guild_channel_mappings.append(channel_mapping_config)\n "
}
] |
GVRDGrunt | 5b51ff1d37e5f5b21ef8f60a7bc037384b28fd25 | 0888aae34ed10e3f957cf9e867681ab9c9d10700 | db_migration_scripts/raid_fyi_migration.py | https://github.com/rhliang/GVRDGrunt | true | false | true | @@ -56,7 +56,7 @@ def get_all_fyi_configuration(conn):
"guild_id": {"N": str(guild_id)},
"config_channel_message": {"S": "chatchannel{}".format(chat_channel_id)},
"relay_channel": {"N": str(fyi_channel_id)},
- "timeout_in_hours": {"N": 24}
+ "timeout_in_hours": {"N": 12}
}
guild_channel_mappings.append(channel_mapping_config)
| { "N" : 24 } | { "N" : 12 } | CHANGE_NUMERIC_LITERAL | [["Update", ["integer:24", 3, 47, 3, 49], "12"]] | rhliang/GVRDGrunt@5b51ff1d37e5f5b21ef8f60a7bc037384b28fd25 | More sensible default timeout in the migration script. | [
{
"sha": "843e53bc906d3cb42d0df69cb7b9189fc0fe8f6d",
"filename": "db_migration_scripts/raid_fyi_migration.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rhliang/GVRDGrunt/blob/5b51ff1d37e5f5b21ef8f60a7bc037384b28fd25/db_migration_scripts%2Fraid_fyi_migration.py",
"raw_url": "https://github.com/rhliang/GVRDGrunt/raw/5b51ff1d37e5f5b21ef8f60a7bc037384b28fd25/db_migration_scripts%2Fraid_fyi_migration.py",
"contents_url": "https://api.github.com/repos/rhliang/GVRDGrunt/contents/db_migration_scripts%2Fraid_fyi_migration.py?ref=5b51ff1d37e5f5b21ef8f60a7bc037384b28fd25",
"patch": "@@ -56,7 +56,7 @@ def get_all_fyi_configuration(conn):\n \"guild_id\": {\"N\": str(guild_id)},\n \"config_channel_message\": {\"S\": \"chatchannel{}\".format(chat_channel_id)},\n \"relay_channel\": {\"N\": str(fyi_channel_id)},\n- \"timeout_in_hours\": {\"N\": 24}\n+ \"timeout_in_hours\": {\"N\": 12}\n }\n guild_channel_mappings.append(channel_mapping_config)\n "
}
] |
GVRDGrunt | 1eb237455f65edb318ac9ff876098cd1638ae2e7 | 5b51ff1d37e5f5b21ef8f60a7bc037384b28fd25 | db_migration_scripts/raid_fyi_migration.py | https://github.com/rhliang/GVRDGrunt | true | false | true | @@ -56,7 +56,7 @@ def get_all_fyi_configuration(conn):
"guild_id": {"N": str(guild_id)},
"config_channel_message": {"S": "chatchannel{}".format(chat_channel_id)},
"relay_channel": {"N": str(fyi_channel_id)},
- "timeout_in_hours": {"N": 12}
+ "timeout_in_hours": {"N": str(12)}
}
guild_channel_mappings.append(channel_mapping_config)
| { "N" : 12 } | { "N" : str ( 12 ) } | ADD_FUNCTION_AROUND_EXPRESSION | [["Insert", ["pair", 3, 42, 3, 49], ["call", "N0"], 2], ["Insert", "N0", ["identifier:str", "T"], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Move", "N1", ["integer:12", 3, 47, 3, 49], 1], ["Insert", "N1", ["):)", "T"], 2]] | rhliang/GVRDGrunt@1eb237455f65edb318ac9ff876098cd1638ae2e7 | Fixed the migration script, it was returning timeout_in_hours as a number and not a string. | [
{
"sha": "2197ea53c704c049b6c288c31f7fd6585dc70a65",
"filename": "db_migration_scripts/raid_fyi_migration.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rhliang/GVRDGrunt/blob/1eb237455f65edb318ac9ff876098cd1638ae2e7/db_migration_scripts%2Fraid_fyi_migration.py",
"raw_url": "https://github.com/rhliang/GVRDGrunt/raw/1eb237455f65edb318ac9ff876098cd1638ae2e7/db_migration_scripts%2Fraid_fyi_migration.py",
"contents_url": "https://api.github.com/repos/rhliang/GVRDGrunt/contents/db_migration_scripts%2Fraid_fyi_migration.py?ref=1eb237455f65edb318ac9ff876098cd1638ae2e7",
"patch": "@@ -56,7 +56,7 @@ def get_all_fyi_configuration(conn):\n \"guild_id\": {\"N\": str(guild_id)},\n \"config_channel_message\": {\"S\": \"chatchannel{}\".format(chat_channel_id)},\n \"relay_channel\": {\"N\": str(fyi_channel_id)},\n- \"timeout_in_hours\": {\"N\": 12}\n+ \"timeout_in_hours\": {\"N\": str(12)}\n }\n guild_channel_mappings.append(channel_mapping_config)\n "
}
] |
refurbished-mac-finder | 922e94befca6268a20a020163f6540b578b2c3e8 | cf44358d9439bd7d7f7d7ab3d8251a4e0d786927 | refmac.py | https://github.com/pdarragh/refurbished-mac-finder | true | false | false | @@ -6,7 +6,7 @@ if __name__ == '__main__':
import json
parser = argparse.ArgumentParser()
parser.add_argument('product_type', metavar='product-type', choices=[t for t in ProductType], type=lambda s: getattr(ProductType, s))
- parser.add_argument('--auth-file', type=argparse.FileType('r'))
+ parser.add_argument('--auth-file', type=argparse.FileType('r'), default='twilio_conf.json')
parser.add_argument('--twilio-sid')
parser.add_argument('--twilio-token')
parser.add_argument('--specs', type=json.loads, default={})
| parser . add_argument ( '--auth-file' , type = argparse . FileType ( 'r' ) ) | parser . add_argument ( '--auth-file' , type = argparse . FileType ( 'r' ) , default = 'twilio_conf.json' ) | SAME_FUNCTION_MORE_ARGS | [["Insert", ["argument_list", 3, 24, 3, 68], [",:,", "T"], 4], ["Insert", ["argument_list", 3, 24, 3, 68], ["keyword_argument", "N0"], 5], ["Insert", "N0", ["identifier:default", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["string:'twilio_conf.json'", "T"], 2]] | pdarragh/refurbished-mac-finder@922e94befca6268a20a020163f6540b578b2c3e8 | Automatically include default Twilio authentication file | [
{
"sha": "d09e9b7c33c6bfcb3d06e5d7850e4b815077f8ba",
"filename": "refmac.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/pdarragh/refurbished-mac-finder/blob/922e94befca6268a20a020163f6540b578b2c3e8/refmac.py",
"raw_url": "https://github.com/pdarragh/refurbished-mac-finder/raw/922e94befca6268a20a020163f6540b578b2c3e8/refmac.py",
"contents_url": "https://api.github.com/repos/pdarragh/refurbished-mac-finder/contents/refmac.py?ref=922e94befca6268a20a020163f6540b578b2c3e8",
"patch": "@@ -6,7 +6,7 @@\n import json\n parser = argparse.ArgumentParser()\n parser.add_argument('product_type', metavar='product-type', choices=[t for t in ProductType], type=lambda s: getattr(ProductType, s))\n- parser.add_argument('--auth-file', type=argparse.FileType('r'))\n+ parser.add_argument('--auth-file', type=argparse.FileType('r'), default='twilio_conf.json')\n parser.add_argument('--twilio-sid')\n parser.add_argument('--twilio-token')\n parser.add_argument('--specs', type=json.loads, default={})"
}
] |
scikit-image | c5ac705123f302026dfbc3cc3353a8b3f38154bc | 22ffc20fc44a23450fb312208cc0bb61f3ad1e3d | skimage/feature/peak.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -149,7 +149,7 @@ def peak_local_max(image, min_distance=10, threshold_abs=0, threshold_rel=0.1,
coordinates = np.transpose((image > peak_threshold).nonzero())
if coordinates.shape[0] > num_peaks:
- intensities = image[coordinates[:, 0], coordinates[:, 1]]
+ intensities = image.flat[np.ravel_multi_index(coordinates.transpose(),image.shape)]
idx_maxsort = np.argsort(intensities)[::-1]
coordinates = coordinates[idx_maxsort][:num_peaks]
| intensities = image [ coordinates [ : , 0 ] , coordinates [ : , 1 ] ] | intensities = image . flat [ np . ravel_multi_index ( coordinates . transpose ( ) , image . shape ) ] | SINGLE_STMT | [["Insert", ["subscript", 3, 23, 3, 66], ["attribute", "N0"], 0], ["Insert", ["subscript", 3, 23, 3, 66], ["call", "N1"], 3], ["Move", "N0", ["identifier:image", 3, 23, 3, 28], 0], ["Insert", "N0", [".:.", "T"], 1], ["Update", ["identifier:coordinates", 3, 29, 3, 40], "flat"], ["Move", "N0", ["identifier:coordinates", 3, 29, 3, 40], 2], ["Insert", "N1", ["attribute", "N2"], 0], ["Insert", "N1", ["argument_list", "N3"], 1], ["Insert", "N2", ["identifier:np", "T"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:ravel_multi_index", "T"], 2], ["Insert", "N3", ["(:(", "T"], 0], ["Insert", "N3", ["call", "N4"], 1], ["Move", "N3", [",:,", 3, 61, 3, 62], 2], ["Insert", "N3", ["attribute", "N5"], 3], ["Insert", "N3", ["):)", "T"], 4], ["Insert", "N4", ["attribute", "N6"], 0], ["Insert", "N4", ["argument_list", "N7"], 1], ["Insert", "N5", ["identifier:image", "T"], 0], ["Insert", "N5", [".:.", "T"], 1], ["Insert", "N5", ["identifier:shape", "T"], 2], ["Move", "N6", ["identifier:coordinates", 3, 48, 3, 59], 0], ["Insert", "N6", [".:.", "T"], 1], ["Insert", "N6", ["identifier:transpose", "T"], 2], ["Insert", "N7", ["(:(", "T"], 0], ["Insert", "N7", ["):)", "T"], 1], ["Delete", ["[:[", 3, 40, 3, 41]], ["Delete", [":::", 3, 41, 3, 42]], ["Delete", ["slice", 3, 41, 3, 42]], ["Delete", [",:,", 3, 42, 3, 43]], ["Delete", ["integer:0", 3, 44, 3, 45]], ["Delete", ["]:]", 3, 45, 3, 46]], ["Delete", ["subscript", 3, 29, 3, 46]], ["Delete", [",:,", 3, 46, 3, 47]], ["Delete", ["[:[", 3, 59, 3, 60]], ["Delete", [":::", 3, 60, 3, 61]], ["Delete", ["slice", 3, 60, 3, 61]], ["Delete", ["integer:1", 3, 63, 3, 64]], ["Delete", ["]:]", 3, 64, 3, 65]], ["Delete", ["subscript", 3, 48, 3, 65]]] | matsuken92/scikit-image@c5ac705123f302026dfbc3cc3353a8b3f38154bc | Fixed bug in feature.peak_local_max: num_peaks should now be usable for ND arrays. | [
{
"sha": "7580efc269f2fce1bd3363c6dd67f4e389535e82",
"filename": "skimage/feature/peak.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/c5ac705123f302026dfbc3cc3353a8b3f38154bc/skimage%2Ffeature%2Fpeak.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/c5ac705123f302026dfbc3cc3353a8b3f38154bc/skimage%2Ffeature%2Fpeak.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffeature%2Fpeak.py?ref=c5ac705123f302026dfbc3cc3353a8b3f38154bc",
"patch": "@@ -149,7 +149,7 @@ def peak_local_max(image, min_distance=10, threshold_abs=0, threshold_rel=0.1,\n coordinates = np.transpose((image > peak_threshold).nonzero())\n \n if coordinates.shape[0] > num_peaks:\n- intensities = image[coordinates[:, 0], coordinates[:, 1]]\n+ intensities = image.flat[np.ravel_multi_index(coordinates.transpose(),image.shape)]\n idx_maxsort = np.argsort(intensities)[::-1]\n coordinates = coordinates[idx_maxsort][:num_peaks]\n "
}
] |
scikit-image | 9a192bf1cb899632253619385ad9814dbd61f63a | f33c2cad1317631f8902bd487bc80edc7d6515ed | doc/examples/plot_rag_merge.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -16,7 +16,7 @@ from skimage import graph, data, io, segmentation, color
img = data.coffee()
labels = segmentation.slic(img, compactness=30, n_segments=400)
g = graph.rag_mean_color(img, labels)
-labels2 = graph.merge_hierarchical(g, labels, 40)
+labels2 = graph.merge_hierarchical(labels, g, 40)
g2 = graph.rag_mean_color(img, labels2)
out = color.label2rgb(labels2, img, kind='avg')
| labels2 = graph . merge_hierarchical ( g , labels , 40 ) | labels2 = graph . merge_hierarchical ( labels , g , 40 ) | SAME_FUNCTION_SWAP_ARGS | [["Move", ["identifier:g", 3, 36, 3, 37], ["argument_list", 3, 35, 3, 50], 3], ["Move", [",:,", 3, 37, 3, 38], ["argument_list", 3, 35, 3, 50], 4]] | matsuken92/scikit-image@9a192bf1cb899632253619385ad9814dbd61f63a | fix example | [
{
"sha": "ac7eab7fd8d2e91a46a2d7f8d763ff8a2824f2c1",
"filename": "doc/examples/plot_rag_merge.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/9a192bf1cb899632253619385ad9814dbd61f63a/doc%2Fexamples%2Fplot_rag_merge.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/9a192bf1cb899632253619385ad9814dbd61f63a/doc%2Fexamples%2Fplot_rag_merge.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/doc%2Fexamples%2Fplot_rag_merge.py?ref=9a192bf1cb899632253619385ad9814dbd61f63a",
"patch": "@@ -16,7 +16,7 @@\n img = data.coffee()\n labels = segmentation.slic(img, compactness=30, n_segments=400)\n g = graph.rag_mean_color(img, labels)\n-labels2 = graph.merge_hierarchical(g, labels, 40)\n+labels2 = graph.merge_hierarchical(labels, g, 40)\n g2 = graph.rag_mean_color(img, labels2)\n \n out = color.label2rgb(labels2, img, kind='avg')"
}
] |
scikit-image | 2308ba0617dcfe3123db5640a7734f47eead4148 | c0a5010998fd5c9f2af2d348a4731c0646c50f3a | skimage/viewer/viewers/core.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -60,7 +60,7 @@ class BlitManager(object):
def remove_artists(self, artists):
for artist in artists:
- self.artist.remove(artist)
+ self.artists.remove(artist)
def on_draw_event(self, event=None):
self.background = self.canvas.copy_from_bbox(self.ax.bbox)
| self . artist . remove ( artist ) | self . artists . remove ( artist ) | CHANGE_ATTRIBUTE_USED | [["Update", ["identifier:artist", 3, 18, 3, 24], "artists"]] | matsuken92/scikit-image@2308ba0617dcfe3123db5640a7734f47eead4148 | fix typo artist.remove -> artists.remove | [
{
"sha": "6cf6ffc8bff996fe387113bda208c250383fba79",
"filename": "skimage/viewer/viewers/core.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/2308ba0617dcfe3123db5640a7734f47eead4148/skimage%2Fviewer%2Fviewers%2Fcore.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/2308ba0617dcfe3123db5640a7734f47eead4148/skimage%2Fviewer%2Fviewers%2Fcore.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fviewer%2Fviewers%2Fcore.py?ref=2308ba0617dcfe3123db5640a7734f47eead4148",
"patch": "@@ -60,7 +60,7 @@ def add_artists(self, artists):\n \n def remove_artists(self, artists):\n for artist in artists:\n- self.artist.remove(artist)\n+ self.artists.remove(artist)\n \n def on_draw_event(self, event=None):\n self.background = self.canvas.copy_from_bbox(self.ax.bbox)"
}
] |
scikit-image | 84bcb583d76c1ec507b3d5794b6705d06383ced8 | 6ddec9bd85226b39fb07e23e89b17b7ef3048de0 | skimage/feature/corner.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -288,7 +288,7 @@ def hessian_matrix_eigvals(Hxx, Hxy, Hyy):
- return _image_orthogonal_matrix22_eigvals(Hyy, Hxy, Hyy)
+ return _image_orthogonal_matrix22_eigvals(Hxx, Hxy, Hyy)
def corner_kitchen_rosenfeld(image, mode='constant', cval=0):
| return _image_orthogonal_matrix22_eigvals ( Hyy , Hxy , Hyy ) | return _image_orthogonal_matrix22_eigvals ( Hxx , Hxy , Hyy ) | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:Hyy", 1, 47, 1, 50], "Hxx"]] | matsuken92/scikit-image@84bcb583d76c1ec507b3d5794b6705d06383ced8 | Fix Hessian matrix eigvals | [
{
"sha": "5e2251dc792573f1a7a322a83f333d11caf043c9",
"filename": "skimage/feature/corner.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/84bcb583d76c1ec507b3d5794b6705d06383ced8/skimage%2Ffeature%2Fcorner.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/84bcb583d76c1ec507b3d5794b6705d06383ced8/skimage%2Ffeature%2Fcorner.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffeature%2Fcorner.py?ref=84bcb583d76c1ec507b3d5794b6705d06383ced8",
"patch": "@@ -288,7 +288,7 @@ def hessian_matrix_eigvals(Hxx, Hxy, Hyy):\n \n \"\"\"\n \n- return _image_orthogonal_matrix22_eigvals(Hyy, Hxy, Hyy)\n+ return _image_orthogonal_matrix22_eigvals(Hxx, Hxy, Hyy)\n \n \n def corner_kitchen_rosenfeld(image, mode='constant', cval=0):"
}
] |
scikit-image | 33e36542d5f457a50c5fa00371fb9fe18a620f15 | d4463ba53776384b748573c5b54f209c117cef25 | skimage/transform/hough_transform.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -84,7 +84,7 @@ def hough_line_peaks(hspace, angles, dists, min_distance=9, min_angle=10,
-min_angle:min_angle + 1]
for dist_idx, angle_idx in coords:
- accum = hspace[dist_idx, angle_idx]
+ accum = hspace_max[dist_idx, angle_idx]
if accum > threshold:
# absolute coordinate grid for local neighbourhood suppression
dist_nh = dist_idx + dist_ext
| accum = hspace [ dist_idx , angle_idx ] | accum = hspace_max [ dist_idx , angle_idx ] | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:hspace", 3, 17, 3, 23], "hspace_max"]] | matsuken92/scikit-image@33e36542d5f457a50c5fa00371fb9fe18a620f15 | Fix missing peaks in hough_line_peaks. | [
{
"sha": "6467c62f1f7d8b3ec10003d8a75b0179479108b5",
"filename": "skimage/transform/hough_transform.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/33e36542d5f457a50c5fa00371fb9fe18a620f15/skimage%2Ftransform%2Fhough_transform.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/33e36542d5f457a50c5fa00371fb9fe18a620f15/skimage%2Ftransform%2Fhough_transform.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ftransform%2Fhough_transform.py?ref=33e36542d5f457a50c5fa00371fb9fe18a620f15",
"patch": "@@ -84,7 +84,7 @@ def hough_line_peaks(hspace, angles, dists, min_distance=9, min_angle=10,\n -min_angle:min_angle + 1]\n \n for dist_idx, angle_idx in coords:\n- accum = hspace[dist_idx, angle_idx]\n+ accum = hspace_max[dist_idx, angle_idx]\n if accum > threshold:\n # absolute coordinate grid for local neighbourhood suppression\n dist_nh = dist_idx + dist_ext"
}
] |
scikit-image | ad8c94fcaf6c6225ab1ac9686a64417652dd777c | e531e57124a71739f834c23ea930cfb40cb823d3 | skimage/io/collection.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -222,7 +222,7 @@ class ImageCollection(object):
if hasattr(im, 'fp') and im.fp:
im.fp.close()
else:
- index += (fname, 0)
+ index += [(fname, 0)]
self._frame_index = index
return len(index)
| index += ( fname , 0 ) | index += [ ( fname , 0 ) ] | SINGLE_STMT | [["Insert", ["augmented_assignment", 3, 17, 3, 36], ["list", "N0"], 2], ["Insert", "N0", ["[:[", "T"], 0], ["Move", "N0", ["tuple", 3, 26, 3, 36], 1], ["Insert", "N0", ["]:]", "T"], 2]] | matsuken92/scikit-image@ad8c94fcaf6c6225ab1ac9686a64417652dd777c | Fix handling of non-gif and tiff files | [
{
"sha": "b36c95f462c6f68e87856e26c9a11f116caa1e7c",
"filename": "skimage/io/collection.py",
"status": "modified",
"additions": 2,
"deletions": 2,
"changes": 4,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/ad8c94fcaf6c6225ab1ac9686a64417652dd777c/skimage%2Fio%2Fcollection.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/ad8c94fcaf6c6225ab1ac9686a64417652dd777c/skimage%2Fio%2Fcollection.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fio%2Fcollection.py?ref=ad8c94fcaf6c6225ab1ac9686a64417652dd777c",
"patch": "@@ -135,7 +135,7 @@ def imread_convert(f):\n ic = ImageCollection('/tmp/*.png', load_func=imread_convert)\n \n For files with multiple images, the images will be flattened into a list\n- and added to the list of available images. In this case, ``load_func`` \n+ and added to the list of available images. In this case, ``load_func``\n should accept the keyword argument ``img_num``.\n \n Examples\n@@ -222,7 +222,7 @@ def _find_images(self):\n if hasattr(im, 'fp') and im.fp:\n im.fp.close()\n else:\n- index += (fname, 0)\n+ index += [(fname, 0)]\n \n self._frame_index = index\n return len(index)"
}
] |
scikit-image | c86c6effe8ead802e01a8fa83aefc7bc945f2662 | 833edc17ef749054ed629936b2143aef8a8465c8 | skimage/feature/tests/test_blob.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -141,7 +141,7 @@ def test_blob_doh():
radius = lambda x: x[2]
s = sorted(blobs, key=radius)
- thresh = 3
+ thresh = 4
b = s[0]
assert abs(b[0] - 400) <= thresh
| thresh = 3 | thresh = 4 | CHANGE_NUMERIC_LITERAL | [["Update", ["integer:3", 3, 14, 3, 15], "4"]] | matsuken92/scikit-image@c86c6effe8ead802e01a8fa83aefc7bc945f2662 | Fix tests for #1257
The test of blob_doh() set an unrealistically strict threshold for the
accuracy of the estimated blob radius, causing the test to fail with the
true floating-point value (previously, the test passed only because
sigma was truncated to integer). Increasing the threshold fixes the
problem. | [
{
"sha": "5def047c5d4fe8082da23df479ba8bf64d50140e",
"filename": "skimage/feature/tests/test_blob.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/c86c6effe8ead802e01a8fa83aefc7bc945f2662/skimage%2Ffeature%2Ftests%2Ftest_blob.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/c86c6effe8ead802e01a8fa83aefc7bc945f2662/skimage%2Ffeature%2Ftests%2Ftest_blob.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffeature%2Ftests%2Ftest_blob.py?ref=c86c6effe8ead802e01a8fa83aefc7bc945f2662",
"patch": "@@ -141,7 +141,7 @@ def test_blob_doh():\n \n radius = lambda x: x[2]\n s = sorted(blobs, key=radius)\n- thresh = 3\n+ thresh = 4\n \n b = s[0]\n assert abs(b[0] - 400) <= thresh"
}
] |
scikit-image | 3d3351b9faaee80b9c848171e6933cecde069343 | 47cfcb4b8b2cf4cd483427b5d1aaddee1fe74119 | skimage/io/_io.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -59,7 +59,7 @@ def imread(fname, as_grey=False, plugin=None, flatten=None,
if img.ndim > 2:
if img.shape[-1] not in (3, 4) and img.shape[-3] in (3, 4):
img = np.swapaxes(img, -1, -3)
- img = np.swapaxes(img, -1, -2)
+ img = np.swapaxes(img, -2, -3)
if as_grey:
img = rgb2grey(img)
| img = np . swapaxes ( img , - 1 , - 2 ) | img = np . swapaxes ( img , - 2 , - 3 ) | SINGLE_STMT | [["Move", ["unary_operator", 3, 40, 3, 42], ["argument_list", 3, 30, 3, 43], 3], ["Insert", ["argument_list", 3, 30, 3, 43], ["unary_operator", "N0"], 6], ["Insert", "N0", ["-:-", "T"], 0], ["Insert", "N0", ["integer:3", "T"], 1], ["Delete", ["-:-", 3, 36, 3, 37]], ["Delete", ["integer:1", 3, 37, 3, 38]], ["Delete", ["unary_operator", 3, 36, 3, 38]]] | matsuken92/scikit-image@3d3351b9faaee80b9c848171e6933cecde069343 | Fix failing test | [
{
"sha": "8dbc3600a5aadf59420ae3eede244e145b5daef5",
"filename": "skimage/io/_io.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/3d3351b9faaee80b9c848171e6933cecde069343/skimage%2Fio%2F_io.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/3d3351b9faaee80b9c848171e6933cecde069343/skimage%2Fio%2F_io.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fio%2F_io.py?ref=3d3351b9faaee80b9c848171e6933cecde069343",
"patch": "@@ -59,7 +59,7 @@ def imread(fname, as_grey=False, plugin=None, flatten=None,\n if img.ndim > 2:\n if img.shape[-1] not in (3, 4) and img.shape[-3] in (3, 4):\n img = np.swapaxes(img, -1, -3)\n- img = np.swapaxes(img, -1, -2)\n+ img = np.swapaxes(img, -2, -3)\n \n if as_grey:\n img = rgb2grey(img)"
}
] |
scikit-image | b479eabd7e4119994c7d27ff6b54302c629c4211 | 5f067ff43b79d430458b517d229e5235c1734dcb | skimage/io/tests/test_pil.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -65,7 +65,7 @@ def test_imread_separate_channels():
def test_imread_multipage_rgb_tif():
img = imread(os.path.join(data_dir, 'multipage_rgb.tif'))
- assert img.shape == (10, 10, 3), img.shape
+ assert img.shape == (2, 10, 10, 3), img.shape
def test_imread_palette():
| assert img . shape == ( 10 , 10 , 3 ) , img . shape | assert img . shape == ( 2 , 10 , 10 , 3 ) , img . shape | ADD_ELEMENTS_TO_ITERABLE | [["Insert", ["tuple", 3, 25, 3, 36], ["integer:2", "T"], 1], ["Insert", ["tuple", 3, 25, 3, 36], ["integer:10", "T"], 6], ["Insert", ["tuple", 3, 25, 3, 36], [",:,", "T"], 7], ["Delete", ["integer:10", 3, 26, 3, 28]]] | matsuken92/scikit-image@b479eabd7e4119994c7d27ff6b54302c629c4211 | Fix failing pil test | [
{
"sha": "cd4e8939e9ec659c642ab936b15200c2e889e363",
"filename": "skimage/io/tests/test_pil.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/b479eabd7e4119994c7d27ff6b54302c629c4211/skimage%2Fio%2Ftests%2Ftest_pil.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/b479eabd7e4119994c7d27ff6b54302c629c4211/skimage%2Fio%2Ftests%2Ftest_pil.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fio%2Ftests%2Ftest_pil.py?ref=b479eabd7e4119994c7d27ff6b54302c629c4211",
"patch": "@@ -65,7 +65,7 @@ def test_imread_separate_channels():\n \n def test_imread_multipage_rgb_tif():\n img = imread(os.path.join(data_dir, 'multipage_rgb.tif'))\n- assert img.shape == (10, 10, 3), img.shape\n+ assert img.shape == (2, 10, 10, 3), img.shape\n \n \n def test_imread_palette():"
}
] |
scikit-image | 84831fce875365332a1a8fbda6642bfda297c076 | 5ee137f9044fcbb53407206a653b3661b96162ed | skimage/draw/draw.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -64,7 +64,7 @@ def ellipse(cy, cx, yradius, xradius, shape=None):
if shape is not None:
# Constrain upper_left and lower_right by shape boundary.
upper_left = np.maximum(upper_left, np.array([0, 0]))
- lower_right = np.minimum(lower_right, np.array(shape) - 1)
+ lower_right = np.minimum(lower_right, np.array(shape[:2]) - 1)
shifted_center = center - upper_left
bounding_shape = lower_right - upper_left + 1
| lower_right = np . minimum ( lower_right , np . array ( shape ) - 1 ) | lower_right = np . minimum ( lower_right , np . array ( shape [ : 2 ] ) - 1 ) | SINGLE_STMT | [["Insert", ["argument_list", 3, 55, 3, 62], ["subscript", "N0"], 1], ["Move", "N0", ["identifier:shape", 3, 56, 3, 61], 0], ["Insert", "N0", ["[:[", "T"], 1], ["Insert", "N0", ["slice", "N1"], 2], ["Insert", "N0", ["]:]", "T"], 3], ["Insert", "N1", [":::", "T"], 0], ["Insert", "N1", ["integer:2", "T"], 1]] | matsuken92/scikit-image@84831fce875365332a1a8fbda6642bfda297c076 | Fix bug when shape parameter is passed in from color images | [
{
"sha": "1c0576c8cd93eaa807cfa34817aea4f5ea2df7f0",
"filename": "skimage/draw/draw.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/84831fce875365332a1a8fbda6642bfda297c076/skimage%2Fdraw%2Fdraw.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/84831fce875365332a1a8fbda6642bfda297c076/skimage%2Fdraw%2Fdraw.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fdraw%2Fdraw.py?ref=84831fce875365332a1a8fbda6642bfda297c076",
"patch": "@@ -64,7 +64,7 @@ def ellipse(cy, cx, yradius, xradius, shape=None):\n if shape is not None:\n # Constrain upper_left and lower_right by shape boundary.\n upper_left = np.maximum(upper_left, np.array([0, 0]))\n- lower_right = np.minimum(lower_right, np.array(shape) - 1)\n+ lower_right = np.minimum(lower_right, np.array(shape[:2]) - 1)\n \n shifted_center = center - upper_left\n bounding_shape = lower_right - upper_left + 1"
}
] |
scikit-image | eb8c2d2853d3cc0b4ac92824c5cd1e74ed5e5ea8 | 3f8e94ff0c2d5804f15fbfdf405f4e25d9910bd7 | skimage/util/shape.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -113,7 +113,7 @@ def view_as_windows(arr_in, window_shape, step=1):
----------
arr_in : ndarray
N-d input array.
- window_shape : integer or tuple of length arr_in.ndmi
+ window_shape : integer or tuple of length arr_in.ndim
Defines the shape of the elementary n-dimensional orthotope
(better know as hyperrectangle [1]_) of the rolling window view.
If an integer is given, the shape will be a hyperrectangle of
| N - d input array . window_shape : integer or tuple of length arr_in . ndmi | N - d input array . window_shape : integer or tuple of length arr_in . ndim | CHANGE_ATTRIBUTE_USED | [["Update", ["identifier:ndmi", 3, 54, 3, 58], "ndim"]] | matsuken92/scikit-image@eb8c2d2853d3cc0b4ac92824c5cd1e74ed5e5ea8 | Fix typo | [
{
"sha": "53a5a5156133532fe1a335f2100b1506b13678c9",
"filename": "skimage/util/shape.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/eb8c2d2853d3cc0b4ac92824c5cd1e74ed5e5ea8/skimage%2Futil%2Fshape.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/eb8c2d2853d3cc0b4ac92824c5cd1e74ed5e5ea8/skimage%2Futil%2Fshape.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Futil%2Fshape.py?ref=eb8c2d2853d3cc0b4ac92824c5cd1e74ed5e5ea8",
"patch": "@@ -113,7 +113,7 @@ def view_as_windows(arr_in, window_shape, step=1):\n ----------\n arr_in : ndarray\n N-d input array.\n- window_shape : integer or tuple of length arr_in.ndmi\n+ window_shape : integer or tuple of length arr_in.ndim\n Defines the shape of the elementary n-dimensional orthotope\n (better know as hyperrectangle [1]_) of the rolling window view.\n If an integer is given, the shape will be a hyperrectangle of"
}
] |
scikit-image | 55f798109c5f59f646a2b273668b3aac24bfd978 | 0c58501dc7f01d958e06ea6de765424cad6c36b2 | skimage/feature/_daisy.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -91,7 +91,7 @@ def daisy(img, step=4, radius=15, rings=3, histograms=8, orientations=8,
.. [1] Tola et al. "Daisy: An efficient dense descriptor applied to wide-
baseline stereo." Pattern Analysis and Machine Intelligence, IEEE
Transactions on 32.5 (2010): 815-830.
- .. [2] http://cvlab.epfl.ch/alumni/tola/daisy.html
+ .. [2] http://cvlab.epfl.ch/software/daisy
| http : // cvlab . epfl . ch / alumni / tola / daisy . html | http : // cvlab . epfl . ch / software / daisy | SINGLE_STMT | [["Update", ["identifier:tola", 3, 40, 3, 44], "daisy"], ["Update", ["identifier:alumni", 3, 33, 3, 39], "software"], ["Delete", ["/:/", 3, 44, 3, 45]], ["Delete", ["identifier:daisy", 3, 45, 3, 50]], ["Delete", [".:.", 3, 50, 3, 51]], ["Delete", ["identifier:html", 3, 51, 3, 55]], ["Delete", ["attribute", 3, 45, 3, 55]]] | matsuken92/scikit-image@55f798109c5f59f646a2b273668b3aac24bfd978 | Fix a broken link to daisy code | [
{
"sha": "6dca0c594701e1fb4b4ef91f9c2789b7bfe67268",
"filename": "skimage/feature/_daisy.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/55f798109c5f59f646a2b273668b3aac24bfd978/skimage%2Ffeature%2F_daisy.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/55f798109c5f59f646a2b273668b3aac24bfd978/skimage%2Ffeature%2F_daisy.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffeature%2F_daisy.py?ref=55f798109c5f59f646a2b273668b3aac24bfd978",
"patch": "@@ -91,7 +91,7 @@ def daisy(img, step=4, radius=15, rings=3, histograms=8, orientations=8,\n .. [1] Tola et al. \"Daisy: An efficient dense descriptor applied to wide-\n baseline stereo.\" Pattern Analysis and Machine Intelligence, IEEE\n Transactions on 32.5 (2010): 815-830.\n- .. [2] http://cvlab.epfl.ch/alumni/tola/daisy.html\n+ .. [2] http://cvlab.epfl.ch/software/daisy\n '''\n \n assert_nD(img, 2, 'img')"
}
] |
scikit-image | 4d6308c8108a2175d5b03708b4fc0120a33414d1 | 43f6ae9a2c948cd4fa16ad7556c6277eb3048dca | skimage/measure/tests/test_fit.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -44,7 +44,7 @@ def test_line_model_residuals():
assert_equal(abs(model.residuals(np.array([[10, 0]]))), 10)
model._params = (5, np.pi / 4)
assert_equal(abs(model.residuals(np.array([[0, 0]]))), 5)
- assert_equal(abs(model.residuals(np.array([[np.sqrt(50), 0]]))), 5)
+ assert_almost_equal(abs(model.residuals(np.array([[np.sqrt(50), 0]]))), 0)
def test_line_model_under_determined():
| assert_equal ( abs ( model . residuals ( np . array ( [ [ np . sqrt ( 50 ) , 0 ] ] ) ) ) , 5 ) | assert_almost_equal ( abs ( model . residuals ( np . array ( [ [ np . sqrt ( 50 ) , 0 ] ] ) ) ) , 0 ) | SINGLE_STMT | [["Update", ["identifier:assert_equal", 3, 5, 3, 17], "assert_almost_equal"], ["Update", ["integer:5", 3, 70, 3, 71], "0"]] | matsuken92/scikit-image@4d6308c8108a2175d5b03708b4fc0120a33414d1 | Fix error in line model test | [
{
"sha": "253ac0eac177f073c858079461eec95b413d6af7",
"filename": "skimage/measure/tests/test_fit.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/4d6308c8108a2175d5b03708b4fc0120a33414d1/skimage%2Fmeasure%2Ftests%2Ftest_fit.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/4d6308c8108a2175d5b03708b4fc0120a33414d1/skimage%2Fmeasure%2Ftests%2Ftest_fit.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fmeasure%2Ftests%2Ftest_fit.py?ref=4d6308c8108a2175d5b03708b4fc0120a33414d1",
"patch": "@@ -44,7 +44,7 @@ def test_line_model_residuals():\n assert_equal(abs(model.residuals(np.array([[10, 0]]))), 10)\n model._params = (5, np.pi / 4)\n assert_equal(abs(model.residuals(np.array([[0, 0]]))), 5)\n- assert_equal(abs(model.residuals(np.array([[np.sqrt(50), 0]]))), 5)\n+ assert_almost_equal(abs(model.residuals(np.array([[np.sqrt(50), 0]]))), 0)\n \n \n def test_line_model_under_determined():"
}
] |
scikit-image | 9e8979fe4d8e1c38c21298214f5ea75df65904de | fe2e214385146ef93621698bf6475d8be6e0f51a | skimage/feature/orb.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -184,6 +184,6 @@ def descriptor_orb(image, keypoints, orientations, scales,
descriptors_list.append(curr_scale_descriptors)
filtered_keypoints_list.append(curr_scale_kpts)
- descriptors = np.vstack(descriptors_list)
+ descriptors = np.vstack(descriptors_list).astype(np.bool)
filtered_keypoints = np.vstack(filtered_keypoints_list)
return descriptors, filtered_keypoints
| descriptors = np . vstack ( descriptors_list ) | descriptors = np . vstack ( descriptors_list ) . astype ( np . bool ) | ADD_METHOD_CALL | [["Insert", ["call", 3, 19, 3, 46], ["attribute", "N0"], 0], ["Insert", ["call", 3, 19, 3, 46], ["argument_list", "N1"], 1], ["Move", "N0", ["call", 3, 19, 3, 46], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:astype", "T"], 2], ["Insert", "N1", ["(:(", "T"], 0], ["Insert", "N1", ["attribute", "N2"], 1], ["Insert", "N1", ["):)", "T"], 2], ["Insert", "N2", ["identifier:np", "T"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:bool", "T"], 2]] | matsuken92/scikit-image@9e8979fe4d8e1c38c21298214f5ea75df65904de | Converting descriptors dtype to bool | [
{
"sha": "736f773983a3515cedbfb39b4eb13cae29341ed3",
"filename": "skimage/feature/orb.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/9e8979fe4d8e1c38c21298214f5ea75df65904de/skimage%2Ffeature%2Forb.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/9e8979fe4d8e1c38c21298214f5ea75df65904de/skimage%2Ffeature%2Forb.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffeature%2Forb.py?ref=9e8979fe4d8e1c38c21298214f5ea75df65904de",
"patch": "@@ -184,6 +184,6 @@ def descriptor_orb(image, keypoints, orientations, scales,\n descriptors_list.append(curr_scale_descriptors)\n filtered_keypoints_list.append(curr_scale_kpts)\n \n- descriptors = np.vstack(descriptors_list)\n+ descriptors = np.vstack(descriptors_list).astype(np.bool)\n filtered_keypoints = np.vstack(filtered_keypoints_list)\n return descriptors, filtered_keypoints"
}
] |
scikit-image | d7b598c30b41f5a83c94e9c1a4c8fe166e9f4f63 | 722347388bbf5a8de5e08b45a03d15b81948a0e5 | skimage/feature/brief.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -4,7 +4,7 @@ from scipy.ndimage.filters import gaussian_filter
from .util import (DescriptorExtractor, _mask_border_keypoints,
_prepare_grayscale_input_2D)
-from ._brief_cy import _brief_loop
+from .brief_cy import _brief_loop
class BRIEF(DescriptorExtractor):
| from . _brief_cy import _brief_loop | from . brief_cy import _brief_loop | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:_brief_cy", 3, 7, 3, 16], "brief_cy"]] | matsuken92/scikit-image@d7b598c30b41f5a83c94e9c1a4c8fe166e9f4f63 | Fix legacy import | [
{
"sha": "38ed7061a81902a5c4a54cdf60ba2aa2dade0e89",
"filename": "skimage/feature/brief.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/d7b598c30b41f5a83c94e9c1a4c8fe166e9f4f63/skimage%2Ffeature%2Fbrief.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/d7b598c30b41f5a83c94e9c1a4c8fe166e9f4f63/skimage%2Ffeature%2Fbrief.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffeature%2Fbrief.py?ref=d7b598c30b41f5a83c94e9c1a4c8fe166e9f4f63",
"patch": "@@ -4,7 +4,7 @@\n from .util import (DescriptorExtractor, _mask_border_keypoints,\n _prepare_grayscale_input_2D)\n \n-from ._brief_cy import _brief_loop\n+from .brief_cy import _brief_loop\n \n \n class BRIEF(DescriptorExtractor):"
}
] |
scikit-image | d00b851204726a5a14dd9a3fe9b0623bea9d275a | 0559105f83fb28482f66e9c8f696e0d0059c646c | skimage/feature/util.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -137,7 +137,7 @@ def _mask_border_keypoints(image_shape, keypoints, distance):
----------
image_shape : (2, ) array_like
Shape of the image as ``(rows, cols)``.
- coords : (N, 2) array
+ keypoints : (N, 2) array
Keypoint coordinates as ``(rows, cols)``.
distance : int
Image border distance.
| `` . coords : ( N , 2 ) array | `` . keypoints : ( N , 2 ) array | CHANGE_ATTRIBUTE_USED | [["Update", ["identifier:coords", 3, 5, 3, 11], "keypoints"]] | matsuken92/scikit-image@d00b851204726a5a14dd9a3fe9b0623bea9d275a | Fix wrong parameter name in doc string | [
{
"sha": "b8afed57fe8954089563bf94ca5f1b9b0b291977",
"filename": "skimage/feature/util.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/d00b851204726a5a14dd9a3fe9b0623bea9d275a/skimage%2Ffeature%2Futil.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/d00b851204726a5a14dd9a3fe9b0623bea9d275a/skimage%2Ffeature%2Futil.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffeature%2Futil.py?ref=d00b851204726a5a14dd9a3fe9b0623bea9d275a",
"patch": "@@ -137,7 +137,7 @@ def _mask_border_keypoints(image_shape, keypoints, distance):\n ----------\n image_shape : (2, ) array_like\n Shape of the image as ``(rows, cols)``.\n- coords : (N, 2) array\n+ keypoints : (N, 2) array\n Keypoint coordinates as ``(rows, cols)``.\n distance : int\n Image border distance."
}
] |
scikit-image | a5e2b99e722bb92bac6a5fd0ac996bd793162403 | 121fa8f0dbb1dde9a9e83b404f74d6e23f81399e | doc/examples/plot_censure.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -3,7 +3,7 @@
CenSurE feature detector
========================
-The CenSurE feature detector is a scale-invariant center-surround detectors
+The CenSurE feature detector is a scale-invariant center-surround detector
(CenSurE) that claims to outperform other detectors and is capable of real-time
implementation.
| feature detector is a scale - invariant center - surround detectors | feature detector is a scale - invariant center - surround detector | CHANGE_BINARY_OPERAND | [["Update", ["identifier:detectors", 3, 67, 3, 76], "detector"]] | matsuken92/scikit-image@a5e2b99e722bb92bac6a5fd0ac996bd793162403 | Fix typo | [
{
"sha": "15cbbd13c49285f1052373cdecbb230363b39ccf",
"filename": "doc/examples/plot_censure.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/a5e2b99e722bb92bac6a5fd0ac996bd793162403/doc%2Fexamples%2Fplot_censure.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/a5e2b99e722bb92bac6a5fd0ac996bd793162403/doc%2Fexamples%2Fplot_censure.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/doc%2Fexamples%2Fplot_censure.py?ref=a5e2b99e722bb92bac6a5fd0ac996bd793162403",
"patch": "@@ -3,7 +3,7 @@\n CenSurE feature detector\n ========================\n \n-The CenSurE feature detector is a scale-invariant center-surround detectors\n+The CenSurE feature detector is a scale-invariant center-surround detector\n (CenSurE) that claims to outperform other detectors and is capable of real-time\n implementation.\n "
}
] |
scikit-image | 48334705c10b77b3846c4dfb4775cf6ed9428cf5 | 50e155e254f9d6f6846aa803eca9c2721b38c01c | skimage/feature/template.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -100,7 +100,7 @@ def match_template(image, template, pad_input=False, mode='constant',
- if image.ndim not in (2, 3):
+ if image.ndim not in (2, 3) or template.ndim not in (2, 3):
raise ValueError("Only 2- and 3-D images supported.")
if image.ndim != template.ndim:
raise ValueError("Dimensionality of template must match image.")
| if image . ndim not in ( 2 , 3 ) : raise ValueError ( "Only 2- and 3-D images supported." ) | if image . ndim not in ( 2 , 3 ) or template . ndim not in ( 2 , 3 ) : raise ValueError ( "Only 2- and 3-D images supported." ) | LESS_SPECIFIC_IF | [["Insert", ["if_statement", 1, 5, 2, 62], ["boolean_operator", "N0"], 1], ["Move", "N0", ["comparison_operator", 1, 8, 1, 32], 0], ["Insert", "N0", ["or:or", "T"], 1], ["Insert", "N0", ["comparison_operator", "N1"], 2], ["Insert", "N1", ["attribute", "N2"], 0], ["Insert", "N1", ["not:not", "T"], 1], ["Insert", "N1", ["in:in", "T"], 2], ["Insert", "N1", ["tuple", "N3"], 3], ["Insert", "N2", ["identifier:template", "T"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:ndim", "T"], 2], ["Insert", "N3", ["(:(", "T"], 0], ["Insert", "N3", ["integer:2", "T"], 1], ["Insert", "N3", [",:,", "T"], 2], ["Insert", "N3", ["integer:3", "T"], 3], ["Insert", "N3", ["):)", "T"], 4]] | matsuken92/scikit-image@48334705c10b77b3846c4dfb4775cf6ed9428cf5 | Fix ndim test | [
{
"sha": "7e289711180ca37a553adf8926440273956a334c",
"filename": "skimage/feature/template.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/48334705c10b77b3846c4dfb4775cf6ed9428cf5/skimage%2Ffeature%2Ftemplate.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/48334705c10b77b3846c4dfb4775cf6ed9428cf5/skimage%2Ffeature%2Ftemplate.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Ffeature%2Ftemplate.py?ref=48334705c10b77b3846c4dfb4775cf6ed9428cf5",
"patch": "@@ -100,7 +100,7 @@ def match_template(image, template, pad_input=False, mode='constant',\n [ 0. , 0. , 0. , 0.125, 0.125, 0.125]], dtype=float32)\n \"\"\"\n \n- if image.ndim not in (2, 3):\n+ if image.ndim not in (2, 3) or template.ndim not in (2, 3):\n raise ValueError(\"Only 2- and 3-D images supported.\")\n if image.ndim != template.ndim:\n raise ValueError(\"Dimensionality of template must match image.\")"
}
] |
scikit-image | be7cf29240facdfdb495c8b0e33afc02ba601ee2 | 37ea62dedf8ec04e03c668887cc484c8133d5fd9 | doc/examples/plot_deconvolution.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -34,7 +34,7 @@ from skimage import color, data, deconvolution
lena = color.rgb2gray(data.lena())
from scipy.signal import convolve2d as conv2
-psf = np.ones((5, 5))
+psf = np.ones((5, 5)) / 25
lena = conv2(lena, psf, 'same')
lena += 0.1 * lena.std() * np.random.standard_normal(lena.shape)
| psf = np . ones ( ( 5 , 5 ) ) | psf = np . ones ( ( 5 , 5 ) ) / 25 | SINGLE_STMT | [["Insert", ["assignment", 3, 1, 3, 22], ["binary_operator", "N0"], 2], ["Move", "N0", ["call", 3, 7, 3, 22], 0], ["Insert", "N0", ["/:/", "T"], 1], ["Insert", "N0", ["integer:25", "T"], 2]] | matsuken92/scikit-image@be7cf29240facdfdb495c8b0e33afc02ba601ee2 | Fix example. | [
{
"sha": "f2b5afa4fbfe138a345df6459108c533d96a4bc3",
"filename": "doc/examples/plot_deconvolution.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/be7cf29240facdfdb495c8b0e33afc02ba601ee2/doc%2Fexamples%2Fplot_deconvolution.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/be7cf29240facdfdb495c8b0e33afc02ba601ee2/doc%2Fexamples%2Fplot_deconvolution.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/doc%2Fexamples%2Fplot_deconvolution.py?ref=be7cf29240facdfdb495c8b0e33afc02ba601ee2",
"patch": "@@ -34,7 +34,7 @@\n \n lena = color.rgb2gray(data.lena())\n from scipy.signal import convolve2d as conv2\n-psf = np.ones((5, 5))\n+psf = np.ones((5, 5)) / 25\n lena = conv2(lena, psf, 'same')\n lena += 0.1 * lena.std() * np.random.standard_normal(lena.shape)\n "
}
] |
scikit-image | e3cdd5785ff330068e68392b726953c7681fe99f | be7cf29240facdfdb495c8b0e33afc02ba601ee2 | skimage/deconvolution/wiener.py | https://github.com/matsuken92/scikit-image | true | false | false | @@ -30,7 +30,7 @@ import numpy as np
import numpy.random as npr
from scipy.signal import convolve2d
-import uft
+from . import uft
__copyright__ = "Copyright scikit-image team"
__credits__ = ["François Orieux"]
| import uft | from . import uft | SINGLE_STMT | [["Insert", ["module", 0, 1, 7, 0], ["import_from_statement", "N0"], 2], ["Insert", "N0", ["from:from", "T"], 0], ["Insert", "N0", ["relative_import", "N1"], 1], ["Move", "N0", ["import:import", 3, 1, 3, 7], 2], ["Move", "N0", ["dotted_name", 3, 8, 3, 11], 3], ["Insert", "N1", ["import_prefix", "N2"], 0], ["Insert", "N2", [".:.", "T"], 0], ["Delete", ["import_statement", 3, 1, 3, 11]]] | matsuken92/scikit-image@e3cdd5785ff330068e68392b726953c7681fe99f | Fix relative uft import for travis-ci pass | [
{
"sha": "0b8ac777a09d188d98205a909eac7ed7ef3f8f54",
"filename": "skimage/deconvolution/wiener.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/e3cdd5785ff330068e68392b726953c7681fe99f/skimage%2Fdeconvolution%2Fwiener.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/e3cdd5785ff330068e68392b726953c7681fe99f/skimage%2Fdeconvolution%2Fwiener.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fdeconvolution%2Fwiener.py?ref=e3cdd5785ff330068e68392b726953c7681fe99f",
"patch": "@@ -30,7 +30,7 @@\n import numpy.random as npr\n from scipy.signal import convolve2d\n \n-import uft\n+from . import uft\n \n __copyright__ = \"Copyright scikit-image team\"\n __credits__ = [\"François Orieux\"]"
}
] |
scikit-image | 7f910e353220698e38247625bf8fbbc58e876f4f | a3b360f84aa0d1811724d56952fb6daa5902243e | skimage/setup.py | https://github.com/matsuken92/scikit-image | true | false | true | @@ -12,7 +12,7 @@ def configuration(parent_package='', top_path=None):
config.add_subpackage('draw')
config.add_subpackage('exposure')
config.add_subpackage('feature')
- config.add_subpackage('deconvolution')
+ config.add_subpackage('restoration')
config.add_subpackage('filter')
config.add_subpackage('graph')
config.add_subpackage('io')
| config . add_subpackage ( 'deconvolution' ) | config . add_subpackage ( 'restoration' ) | CHANGE_STRING_LITERAL | [["Update", ["string:'deconvolution'", 3, 27, 3, 42], "'restoration'"]] | matsuken92/scikit-image@7f910e353220698e38247625bf8fbbc58e876f4f | Fix skimage/setup.py | [
{
"sha": "962adb9780fef2ce87fa59f47a02ccaacbf83109",
"filename": "skimage/setup.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/matsuken92/scikit-image/blob/7f910e353220698e38247625bf8fbbc58e876f4f/skimage%2Fsetup.py",
"raw_url": "https://github.com/matsuken92/scikit-image/raw/7f910e353220698e38247625bf8fbbc58e876f4f/skimage%2Fsetup.py",
"contents_url": "https://api.github.com/repos/matsuken92/scikit-image/contents/skimage%2Fsetup.py?ref=7f910e353220698e38247625bf8fbbc58e876f4f",
"patch": "@@ -12,7 +12,7 @@ def configuration(parent_package='', top_path=None):\n config.add_subpackage('draw')\n config.add_subpackage('exposure')\n config.add_subpackage('feature')\n- config.add_subpackage('deconvolution')\n+ config.add_subpackage('restoration')\n config.add_subpackage('filter')\n config.add_subpackage('graph')\n config.add_subpackage('io')"
}
] |