Google Earth Engine Python API,将 ee.list 转换为 Python 列表

Google Earth Engine Python API, converting ee.list to Python list

我正在使用 Google Earth Engine 的 Python API,它提供 ee.number、ee.list、ee.image 等结果对象。我不知道我遗漏了哪个细节,但是下面的代码:

import ee
ee.Initialize()

collection = ee.ImageCollection('MODIS/MCD43A4_NDVI')
print collection.toList(10)

returns:

ee.List({
  "type": "Invocation", 
    "arguments": {
    "count": 10, 
    "collection": {
      "type": "Invocation", 
      "arguments": {
        "id": "MODIS/MCD43A4_NDVI"
      }, 
     "functionName": "ImageCollection.load"
    }
  }, 
  "functionName": "Collection.toList"
})

如何获得实际的 Python 列表?使用

显示的任何方法
print dir(collection.toList(10)) 

只是添加到此 JSON 输出。

下面的代码returns包含所需信息的字典列表:

import ee
ee.Initialize()

collection = ee.ImageCollection('MODIS/MCD43A4_NDVI')
list = collection.toList(10)
print list.getInfo()