mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-27 19:00:47 +08:00
better testing for python 3+
This commit is contained in:
@@ -3,7 +3,7 @@ import base64
|
||||
|
||||
import numpy as np
|
||||
|
||||
if sys.version_info[0] == 3:
|
||||
if sys.version_info >= (3, ):
|
||||
base64decode = base64.decodebytes
|
||||
else:
|
||||
base64decode = base64.decodestring
|
||||
|
||||
@@ -13,8 +13,7 @@ import sys
|
||||
import base64
|
||||
|
||||
# Get base64 encode/decode functions
|
||||
PY3 = sys.version_info[0] == 3
|
||||
if PY3:
|
||||
if sys.version_info >= (3, ):
|
||||
base64encode = base64.encodebytes
|
||||
base64decode = base64.decodebytes
|
||||
else:
|
||||
|
||||
@@ -132,7 +132,7 @@ def test_both_algs_same_result_donut():
|
||||
n = 48
|
||||
a, b = 2.5/n, -1.25
|
||||
isovalue = 0.0
|
||||
#
|
||||
|
||||
vol = np.empty((n,n,n), 'float32')
|
||||
for iz in range(vol.shape[0]):
|
||||
for iy in range(vol.shape[1]):
|
||||
|
||||
Reference in New Issue
Block a user