#NEWLINE# def _create_point( self , ndim , coords ) : #NEWLINE# #INDENT# '\n        Create a coordinate sequence, set X, Y, [Z], and create point\n        ' #NEWLINE# if ( ( ndim < 2 ) or ( ndim > 3 ) ) : #NEWLINE# #INDENT# raise TypeError ( ( 'Invalid point dimension: %s' % str ( cs ) ) ) #NEWLINE# #UNINDENT# cs = capi . create_cs ( c_uint ( 1 ) , c_uint ( ndim ) ) #NEWLINE# i = iter ( coords ) #NEWLINE# capi . cs_setx ( cs , 0 , next ( i ) ) #NEWLINE# capi . cs_sety ( cs , 0 , next ( i ) ) #NEWLINE# if ( ndim == 3 ) : #NEWLINE# #INDENT# capi . cs_setz ( cs , 0 , next ( i ) ) #NEWLINE# #UNINDENT# return capi . create_point ( cs )