This is not supported by default, but you can make it work quite easily! There are several things you'll want to encode if you want the exact same data back:
The data itself, which you can get with obj.tolist() as @travelingbones mentioned. Sometimes this may be good enough.
The data type. I feel this is important in quite some cases.
The dimension (not necessarily 2D), which could be derived from the above if you assume the input is indeed always a 'rectangular' grid.
The memory order (row- or column-major). This doesn't often matter, but sometimes it does (e.g. performance), so why not save everything?
Furthermore, your numpy array could part of your data structure, e.g. you have a list with some matrices inside. For that you could use a custom encoder which basically does the above.
This is not supported by default, but you can make it work quite easily! There are several things you'll want to encode if you want the exact same data back:
The data itself, which you can get with obj.tolist() as @travelingbones mentioned. Sometimes this may be good enough.
The data type. I feel this is important in quite some cases.
The dimension (not necessarily 2D), which could be derived from the above if you assume the input is indeed always a 'rectangular' grid.
The memory order (row- or column-major). This doesn't often matter, but sometimes it does (e.g. performance), so why not save everything?
Furthermore, your numpy array could part of your data structure, e.g. you have a list with some matrices inside. For that you could use a custom encoder which basically does the above.