def __init__(self, size, deriv=<NUM_LIT:0>, value=<NUM_LIT:0>, index=None):
self.deriv = deriv<EOL>self.size = size<EOL>self.v = value<EOL>if deriv > <NUM_LIT:0>:<EOL><INDENT>self.d = np.zeros(size, float)<EOL>if index is not None:<EOL><INDENT>self.d[index] = <NUM_LIT:1><EOL><DEDENT><DEDENT>if deriv > <NUM_LIT:1>:<EOL><INDENT>self.dd = np.zeros((size, size), float)<EOL><DEDENT>if deriv > <NUM_LIT:2>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>
Arguments:
 | ``size`` -- The number of inputs on which this ic depends. e.g. a
               distance depends on 6 Cartesian coordinates.
 | ``deriv`` -- Consider up to deriv order derivatives. (max=2)
 | ``value`` -- The initial value.
 | ``index`` -- If this scalar is one of the input variables, this is
                its index.

The scalar object supports several in place modifications.