在以下代码段中,128.99
包含在输出中,根据定义,它不应包含在内。这是一个错误吗?使用python2和python3进行测试。
In [38]: np.mgrid[119.99:128.99, 0:2]
Out[38]:
array([[[ 119.99, 119.99],
[ 120.99, 120.99],
[ 121.99, 121.99],
[ 122.99, 122.99],
[ 123.99, 123.99],
[ 124.99, 124.99],
[ 125.99, 125.99],
[ 126.99, 126.99],
[ 127.99, 127.99],
[ 128.99, 128.99]],
[[ 0. , 1. ],
[ 0. , 1. ],
[ 0. , 1. ],
[ 0. , 1. ],
[ 0. , 1. ],
[ 0. , 1. ],
[ 0. , 1. ],
[ 0. , 1. ],
[ 0. , 1. ],
[ 0. , 1. ]]])
答案 0 :(得分:2)