@@ -108,7 +108,7 @@ remotely hosted data.
108
108
109
109
::::::::::::::::::::::::::::::::::::::::: callout
110
110
111
- ## Why not use ` skimage.io.imread() `
111
+ ## Why not use ` skimage.io.imread() ` ?
112
112
113
113
The scikit-image library has its own function to read an image,
114
114
so you might be asking why we don't use it here.
@@ -121,6 +121,24 @@ handling metadata.
121
121
122
122
::::::::::::::::::::::::::::::::::::::::::::::::::
123
123
124
+ ::::::::::::::::::::::::::::::::::::::::: callout
125
+
126
+ ## Beyond NumPy arrays
127
+
128
+ Beyond NumPy arrays, there exist other types of variables which are array-like. Notably,
129
+ [ pandas.DataFrame] ( https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html )
130
+ and [ xarray.DataArray] ( https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html )
131
+ can hold labeled, tabular data.
132
+ These are not natively supported in scikit-image, the scientific toolkit we use
133
+ in this lesson for processing image data. However, data stored in these types can
134
+ be converted to ` numpy.ndarray ` with certain assumptions
135
+ (see ` pandas.DataFrame.to_numpy() ` and ` xarray.DataArray.data ` ). Particularly,
136
+ these conversions ignore the sampling coordinates (` DataFrame.index ` ,
137
+ ` DataFrame.columns ` , or ` DataArray.coords ` ), which may result in misrepresented data,
138
+ for instance, when the original data points are irregularly spaced.
139
+
140
+ ::::::::::::::::::::::::::::::::::::::::::::::::::
141
+
124
142
## Working with pixels
125
143
126
144
First, let us add the necessary imports:
0 commit comments