【python】np.unravel_index() 和 map()

1、用法:np.unravel_index(indices, dims)

返回:indices在维度为dims的数组中的索引值,按元组形式返回

>>print(np.unravel_index(2, (2,3)))
    (0, 2)

2、用法:map(function, iterable, ...)

返回:根据提供的函数对指定序列做映射。其实就是调用function,iterable是function调用次数

欢迎批斗~~~

你可能感兴趣的:(Python函数)