class_docstr: Affine warp constraints class.
  
  `AffineWarpConstraints` allow for
  very succinct definitions of constraints on
  the values of entries in affine transform matrices.
docstr: Assigns constraints on scaling components of
  affine transform in 2d.
docstr_tok: ["Assigns","constraints","on","scaling","components","of","affine","transform","in","2d","."]
code: def scale_2d(cls, x=None, y=None):
      """
      Assigns constraints on scaling components of
      affine transform in 2d.
      """
      return cls([[x, None, None], [None, y, None]])
  
imports: from __future__ import absolute_import, division, print_function
  from itertools import chain
  import numpy
  import tensorflow
  from niftynet.layer.base_layer import Layer, LayerFromCallable, Invertible
label_desc: Use image node_id 13 for calling the AffineWarpConstraints obj's underlying member method code with example usage: obj.scale_2d(cls, x, y) and returns: cls