Skip to content

Commit 9a2a78f

Browse files
committed
BUG Remove invalid escape sequences
Older versions of Python would just ignore this, but a SyntaxWarning is printed in newer versions (and it will likely be an error at some point) /closes #151
1 parent 00b8c97 commit 9a2a78f

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

mahotas/features/texture.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2008-2023, Luis Pedro Coelho <[email protected]>
1+
# Copyright (C) 2008-2025, Luis Pedro Coelho <[email protected]>
22
# vim: set ts=4 sts=4 sw=4 expandtab smartindent:
33
#
44
# License: MIT (see COPYING file)
@@ -108,11 +108,11 @@ def haralick(f,
108108
difference between max() and min()) across all the directions (default:
109109
False).
110110
use_x_minus_y_variance : bool, optional
111-
Feature 10 (index 9) has two interpretations, as the variance of \|x-y\|
112-
or as the variance of P(\|x-y\|). In order to achieve compatibility with
111+
Feature 10 (index 9) has two interpretations, as the variance of |x-y|
112+
or as the variance of P(|x-y|). In order to achieve compatibility with
113113
other software and previous versions of mahotas, mahotas defaults to
114-
using ``VAR[P(\|x-y\|)]``; if this argument is True, then it uses
115-
``VAR[\|x-y\|]`` (default: False)
114+
using ``VAR[P(|x-y|)]``; if this argument is True, then it uses
115+
``VAR[|x-y|]`` (default: False)
116116
117117
118118
Returns
@@ -220,11 +220,11 @@ def haralick_features(cmats,
220220
difference between max() and min()) across all the directions (default:
221221
False).
222222
use_x_minus_y_variance : bool, optional
223-
Feature 10 (index 9) has two interpretations, as the variance of \|x-y\|
224-
or as the variance of P(\|x-y\|). In order to achieve compatibility with
223+
Feature 10 (index 9) has two interpretations, as the variance of |x-y|
224+
or as the variance of P(|x-y|). In order to achieve compatibility with
225225
other software and previous versions of mahotas, mahotas defaults to
226-
using ``VAR[P(\|x-y\|)]``; if this argument is True, then it uses
227-
``VAR[\|x-y\|]`` (default: False)
226+
using ``VAR[P(|x-y|)]``; if this argument is True, then it uses
227+
``VAR[|x-y|]`` (default: False)
228228
229229
Returns
230230
-------

mahotas/morph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2008-2019, Luis Pedro Coelho <[email protected]>
1+
# Copyright (C) 2008-2025, Luis Pedro Coelho <[email protected]>
22
# vim: set ts=4 sts=4 sw=4 expandtab smartindent:
33
#
44
# License: MIT
@@ -319,7 +319,7 @@ def hitmiss(input, Bc, out=None, output=None):
319319
320320
For a given pixel position, the hit&miss is ``True`` if, when ``Bc`` is
321321
overlaid on ``input``, centered at that position, the ``1`` values line up
322-
with ``1``\s, while the ``0``\s line up with ``0``\s (``2``\s correspond to
322+
with ``1``, while the ``0`` line up with ``0`` (``2`` correspond to
323323
*don't care*).
324324
325325
Examples

0 commit comments

Comments
 (0)