为什么 imageio.imread 有时 return 是 `imageio.core.util.Array` 而不是 numpy 数组?
Why does imageio.imread sometimes return an `imageio.core.util.Array` instead of a numpy array?
在docs for imageio it says that imageio.imread
returns a numpy array. This has been my experience most of the time, but sometimes it returns an imageio.core.util.Array
object. imageio.core.util.array
is only mentioned once in the imageio documentation, and just noted that imageio.core.Image
is an alias of it. I don't have a small example to provide because I only see it when I'm loading certain images, but I found that it happens in the scipy image processing guide.
imageio.core.util.Array
是NumPy数组的子类,所以说imread
returns是NumPy数组是正确的。您可以在 https://github.com/imageio/imageio/blob/efc560c514409e6425e2d7a839b4904b3d918fcf/imageio/core/util.py#L111.
找到 Array
的源代码
在docs for imageio it says that imageio.imread
returns a numpy array. This has been my experience most of the time, but sometimes it returns an imageio.core.util.Array
object. imageio.core.util.array
is only mentioned once in the imageio documentation, and just noted that imageio.core.Image
is an alias of it. I don't have a small example to provide because I only see it when I'm loading certain images, but I found that it happens in the scipy image processing guide.
imageio.core.util.Array
是NumPy数组的子类,所以说imread
returns是NumPy数组是正确的。您可以在 https://github.com/imageio/imageio/blob/efc560c514409e6425e2d7a839b4904b3d918fcf/imageio/core/util.py#L111.
Array
的源代码