本文整理匯總了Python中org.eclipse.january.dataset.DatasetUtils.calcPositionsFromIndexes方法的典型用法代碼示例。如果您正苦於以下問題:Python DatasetUtils.calcPositionsFromIndexes方法的具體用法?Python DatasetUtils.calcPositionsFromIndexes怎麽用?Python DatasetUtils.calcPositionsFromIndexes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.january.dataset.DatasetUtils
的用法示例。
在下文中一共展示了DatasetUtils.calcPositionsFromIndexes方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: unravel_index
# 需要導入模塊: from org.eclipse.january.dataset import DatasetUtils [as 別名]
# 或者: from org.eclipse.january.dataset.DatasetUtils import calcPositionsFromIndexes [as 別名]
def unravel_index(indices, dims):
'''Converts a flat index (or array of them) into a tuple of coordinate arrays
'''
if isinstance(indices, (tuple, list)):
indices = ndarray(buffer=indices)._jdataset()
if not isinstance(indices, _ds):
return tuple(_sutils.getNDPositionFromShape(indices, dims))
return tuple(_dsutils.calcPositionsFromIndexes(indices, dims))