def _make_3d(field, twod):
shp = list(field.shape)<EOL>if twod and '<STR_LIT:X>' in twod:<EOL><INDENT>shp.insert(<NUM_LIT:1>, <NUM_LIT:1>)<EOL><DEDENT>elif twod:<EOL><INDENT>shp.insert(<NUM_LIT:0>, <NUM_LIT:1>)<EOL><DEDENT>return field.reshape(shp)<EOL>
Add a dimension to field if necessary.

    Args:
        field (numpy.array): the field that need to be 3d.
        twod (str): 'XZ', 'YZ' or None depending on what is relevant.
    Returns:
        numpy.array: reshaped field.