#NEWLINE# def extrudeMatrix( self , parameterMatrix , parameterMatrixCoordinates , parameterValues ) : #NEWLINE# #INDENT# parameterValues = numpy . abs ( parameterValues ) #NEWLINE# extrudedShape = ( parameterMatrix . shape + ( numpy . max ( parameterValues ) , ) ) #NEWLINE# extrudedShape = tuple ( map ( operator . add , extrudedShape , [ 2 , 2 , 2 , 2 ] ) ) #NEWLINE# extrudedMatrix = numpy . zeros ( extrudedShape ) #NEWLINE# extrudedMatrixCoordinates = ( tuple ( map ( operator . add , parameterMatrixCoordinates , [ 1 , 1 , 1 ] ) ) + ( numpy . array ( [ slice ( 1 , ( value + 1 ) ) for value in parameterValues ] ) , ) ) #NEWLINE# for slice4D in zip ( * extrudedMatrixCoordinates ) : #NEWLINE# #INDENT# extrudedMatrix [ value ] = 1 #NEWLINE# #UNINDENT# return ( extrudedMatrix , extrudedMatrixCoordinates )