:nodoc:


 new()



 _initialize()

 Read all the data into memory for the external binary style chart.
320656
def _initialize
    filename   = @filename
    filehandle = File.open(filename, 'rb')

    @filehandle    = filehandle
    @datasize      = FileTest.size(filename)
    @using_tmpfile = false

    # Read the entire external chart binary into the the data buffer.
    # This will be retrieved by _get_data() when the chart is closed().
    @data = @filehandle.read(@datasize)
  end
382447
@SuppressWarnings("squid:S3346")
    private void initialize() throws ContradictionException {

        sumISizes = new long[nbDims];
        computeSumItemSizes();

        int[][] rLoads = new int[nbDims][nbBins];
        int[][] cLoads = new int[nbDims][nbBins];

        for (int i = 0; i < bins.length; i++) {
            bins[i].updateLowerBound(0, this);
            bins[i].updateUpperBound(nbBins - 1, this);
            if (bins[i].isInstantiated()) {
                for (int d = 0; d < nbDims; d++) {
                    rLoads[d][bins[i].getValue()] += iSizes[d][i];
                }
            } else {
                DisposableValueIterator it = bins[i].getValueIterator(true);
                try {
                    while (it.hasNext()) {
                        int b = it.next();
                        for (int d = 0; d < nbDims; d++) {
                            cLoads[d][b] += iSizes[d][i];
                        }
                    }
                } finally {
                    it.dispose();
                }
            }
        }

        int[] slb = new int[nbDims];
        int[] slu = new int[nbDims];
        for (int b = 0; b < nbBins; b++) {
            for (int d = 0; d < nbDims; d++) {
                assignedLoad[d][b].set(rLoads[d][b]);
                potentialLoad[d][b].set(rLoads[d][b] + cLoads[d][b]);
                loads[d][b].updateLowerBound(rLoads[d][b], this);
                loads[d][b].updateUpperBound(rLoads[d][b] + cLoads[d][b], this);
                slb[d] += loads[d][b].getLB();
                slu[d] += loads[d][b].getUB();
            }
        }

        for (int d = 0; d < nbDims; d++) {
            sumLoadInf[d].set(slb[d]);
            sumLoadSup[d].set(slu[d]);
        }

        loadsHaveChanged = getModel().getEnvironment().makeBool(false);

        if (decoKPSimple != null) {
            decoKPSimple.postInitialize();
        }

        assert checkLoadConsistency();

        for (IIntDeltaMonitor delta : deltaMonitor) {
            delta.unfreeze();
        }
    }
1360648
def initial_populate(self, data):
        
        if self.config.parsed:
            return False
        # Otherwise, create a new ConfigKey.
        self.config.load_from_dict(data)
        return True
1169085
def new(self, length, fp, manage_fp, offset):
        # type: (int, BinaryIO, bool, int) -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Inode is already initialized')

        self.data_length = length

        self.data_fp = fp
        self.manage_fp = manage_fp
        self.fp_offset = offset
        self.original_data_location = self.DATA_IN_EXTERNAL_FP

        self._initialized = True
695799
def initialize():
    
    global is_initialized
    # Add the custom multi-constructor
    yaml.add_multi_constructor('!obj:', multi_constructor)
    yaml.add_multi_constructor('!pkl:', multi_constructor_pkl)
    yaml.add_multi_constructor('!import:', multi_constructor_import)
    yaml.add_multi_constructor('!include:', multi_constructor_include)

    def import_constructor(loader, node):
        value = loader.construct_scalar(node)
        return try_to_import(value)

    yaml.add_constructor('!import', import_constructor)
    yaml.add_implicit_resolver(
        '!import',
        re.compile(r'(?:[a-zA-Z_][\w_]+\.)+[a-zA-Z_][\w_]+')
    )
    is_initialized = True
1139449
def _initialize(self, show_bounds, reset_camera, outline):
        """"""
        self.plotter.subplot(*self.loc)
        if outline is None:
            self.plotter.add_mesh(self.input_dataset.outline_corners(),
                    reset_camera=False, color=vtki.rcParams['outline_color'],
                    loc=self.loc)
        elif outline:
            self.plotter.add_mesh(self.input_dataset.outline(),
                    reset_camera=False, color=vtki.rcParams['outline_color'],
                    loc=self.loc)
        # add the axis labels
        if show_bounds:
            self.plotter.show_bounds(reset_camera=False, loc=loc)
        if reset_camera:
            cpos = self.plotter.get_default_cam_pos()
            self.plotter.camera_position = cpos
            self.plotter.reset_camera()
            self.plotter.camera_set = False
838444
def init():
    
    global OUTPUT
    global INCLUDED
    global CURRENT_DIR
    global ENABLED
    global INCLUDEPATH
    global IFDEFS
    global ID_TABLE
    global CURRENT_FILE

    global_.FILENAME = '(stdin)'
    OUTPUT = ''
    INCLUDED = {}
    CURRENT_DIR = ''
    pwd = get_include_path()
    INCLUDEPATH = [os.path.join(pwd, 'library'), os.path.join(pwd, 'library-asm')]
    ENABLED = True
    IFDEFS = []
    global_.has_errors = 0
    global_.error_msg_cache.clear()
    parser.defaulted_states = {}
    ID_TABLE = DefinesTable()
    del CURRENT_FILE[:]
896316
def init_target_object(self, target, data):
        
        target_object = self.init_single_object(target, data.pop(target, data))
        for key, item in data.items():
            key_alias = MANAGER_ALIASES.get(key, key)
            if item:
                # Item is an OrderedDict with 4 possible structure patterns:
                #   - Just an OrderedDict with (key - value)'s
                #   - OrderedDict with single (key - OrderedDict)
                #   - OrderedDict with multiple (key - OrderedDict)'s
                #   - String (like CreativeCode model)
                if isinstance(item, str):
                    children = item
                else:
                    first_key = list(item.keys())[0]
                    if isinstance(item[first_key], OrderedDict):
                        instances = item.values()
                        if len(instances) > 1:
                            children = [self.init_single_object(key_alias, instance) for instance in instances]
                        else:
                            children = self.init_single_object(key_alias, list(instances)[0])
                    else:
                        children = self.init_single_object(key_alias, item)
                setattr(target_object, key.lower(), children)
            else:
                setattr(target_object, key.lower(), None)
        return target_object
1186991
def _read_binary(self):
        """"""
        # NOTE: binary files store binned data using Fortran-like ordering.
        # Dimensions are iterated like z, y, x (so x changes fastest)

        header_path = self.path + 'header'
        with open(header_path) as f_header:
            self._read_header(f_header.read())

        data = np.fromfile(self.path)

        # separate data by statistic
        data = data.reshape((len(self.statistics), -1), order='F')
        data = {stat: data[i] for i, stat in enumerate(self.statistics)}

        # reshape data according to binning
        data_shape = [dim.n_bins for dim in self.dimensions]
        data = {k: v.reshape(data_shape, order='F') for k, v in data.items()}

        self.data = data
1142777
def _init(self):
        """"""
        read_values = []
        read = self._file.read
        last = read(1)
        current = read(1)
        while last != b'' and current != b'' and not \
                (last == b'\r' and current == b'\n'):
            read_values.append(last)
            last = current
            current = read(1)
        if current == b'' and last != b'\r':
            read_values.append(last)
        self._bytes = b''.join(read_values)
1119269
def new_chart_graphicFrame(cls, id_, name, rId, x, y, cx, cy):
        
        graphicFrame = CT_GraphicalObjectFrame.new_graphicFrame(
            id_, name, x, y, cx, cy
        )
        graphicData = graphicFrame.graphic.graphicData
        graphicData.uri = GRAPHIC_DATA_URI_CHART
        graphicData.append(CT_Chart.new_chart(rId))
        return graphicFrame
1119300
def add_the_init(root_dir, data):
  """"""
  init_file = os.path.join(root_dir, '{dataset_type}', '__init__.py')
  context = (
      'from tensorflow_datasets.{dataset_type}.{dataset_name} import '
      '{dataset_cls}  # {TODO} Sort alphabetically\n'
  )
  with gfile.GFile(init_file.format(**data), 'a') as f:
    f.write(context.format(**data))
1145265
def _initialize_with_array(self, data, rowBased=True):
        """"""
        if rowBased:
            self.matrix = []
            if len(data) != self._rows:
                raise ValueError("Size of Matrix does not match")
            for col in xrange(self._columns):
                self.matrix.append([])
                for row in xrange(self._rows):
                    if len(data[row]) != self._columns:
                        raise ValueError("Size of Matrix does not match")
                    self.matrix[col].append(data[row][col])
        else:
            if len(data) != self._columns:
                raise ValueError("Size of Matrix does not match")
            for col in data:
                if len(col) != self._rows:
                    raise ValueError("Size of Matrix does not match")
            self.matrix = copy.deepcopy(data)
278241
def _initialize(self):
        """"""
        self.y_transform = self.y - numpy.mean(self.y)
        self.y_transform /= numpy.std(self.y_transform)
        self.x_transforms = [numpy.zeros(len(self.y)) for _xi in self.x]
        self._compute_sorted_indices()
1112381
private void initNewListBasic() {
    newAdvancedValueSumList = operations.createVector1(newSize);
    newAdvancedValueSumOfLogsList = operations.createVector2(newSize);
    newAdvancedValueSumOfSquaresList = operations.createVector1(newSize);
    newAdvancedValueMinList = operations.createVector1(newSize);
    newAdvancedValueMaxList = operations.createVector1(newSize);
    newAdvancedValueNList = new long[newSize];
  }
760183
def _init_datasource(self, data):
        
        data = self._postprocess_data(data)
        return ColumnDataSource(data=data)
769384
def _initialise(self, feed_type="linear"):
        
        self._filenames = filenames = _create_filenames(self._filename_schema,
                                                        feed_type)
        self._files = files = _open_fits_files(filenames)
        self._axes = axes = _create_axes(filenames, files)
        self._dim_indices = dim_indices = l_ax, m_ax, f_ax = tuple(
            axes.iaxis(d) for d in self._fits_dims)

        # Complain if we can't find required axes
        for i, ax in zip(dim_indices, self._fits_dims):
            if i == -1:
                raise ValueError("'%s' axis not found!" % ax)

        self._cube_extents = _cube_extents(axes, l_ax, m_ax, f_ax,
            self._l_sign, self._m_sign)
        self._shape = tuple(axes.naxis[d] for d in dim_indices) + (4,)
        self._beam_freq_map = axes.grid[f_ax]

        # Now describe our dimension sizes
        self._dim_updates = [(n, axes.naxis[i]) for n, i
            in zip(self._beam_dims, dim_indices)]

        self._initialised = True