Data Model version 2.1.2

Method: indexToPoint


    Converts array index to equivalent point

guid: www.ccpn.ac.uk_Fogh_2011-03-30-18:05:06_00009__www.ccpn.ac.uk_Fogh_2011-03-30-17:55:16_00001
OpType: otherQuery
OpSubType: None
isQuery: True
isAbstract: False
Scope: instance_level
Code: import operator
shape = self.shape
if index >= reduce(operator.mul, shape):
  raise ApiError("value %s of index to large for matrix of size %s" % (index, shape))
if index < 0:
  raise ApiError("Negative value %s of index not allowed" % index)
result = len(shape) * [None]
for ii in range(len(shape)-1,-1,-1):
  index,result[ii] = divmod(index,shape[ii])
result = tuple(result)
  Data Model Version 2.1.2
Go to Top  
  Autogenerated by  PyApiDocGen  revision 1.3   on  Mon Mar 2 17:24:49 2015    from data model package  ccp.api.molecule.MolStructure.DataMatrix   revision ?  
  Work done by the CCPN team.
www.ccpn.ac.uk