load an nparray object from a json filename

    @parameter str filename: path to the file
348431
def from_file(filename):
    
    f = open(filename, 'r')
    j = json.load(f)
    f.close()

    return from_dict(j)
1362664
public function loadJson($filename)
  {
    $result = false;
    if (file_exists($filename) && is_file($filename)) {
      $json = file_get_contents($filename);
      $data = json_decode($json, true);
      if (is_array($data)) {
        foreach ($data as $name => $value) {
          $this->__set($name, $value);
        }
        $result = true;
      }
    }
    return $result;
  }
404812
def read_from_file(self, filename):
        
        if not exists(filename):
            return -1
        with open(filename) as fd:
            needs_json = fd.read()
            try:
                minimum_needs = json.loads(needs_json)
            except (TypeError, ValueError):
                minimum_needs = None

        if not minimum_needs:
            return -1

        return self.update_minimum_needs(minimum_needs)
314104
def from_file(cls, f):
        

        with open_file_like(f, 'r') as fp:
            return cls(json.load(fp))
527119
def get_json(filename):
    
    check_if_this_file_exist(filename)

    #Process this function
    filename = os.path.abspath(filename)
    s = command_line(['exiftool', '-G', '-j', '-sort', filename])
    if s:
        #convert bytes to string
        s = s.decode('utf-8').rstrip('\r\n')
        return json.loads(s)
    else:
        return s
1350577
def load(self, filename):
        """"""
        with open(filename, 'r') as fin:
            proxies = json.load(fin)
        for protocol in proxies:
            for proxy in proxies[protocol]:
                self.proxies[protocol][proxy['addr']] = Proxy(
                    proxy['addr'], proxy['protocol'], proxy['weight'],
                    proxy['last_checked'])
                self.addr_list[protocol].append(proxy['addr'])
1062927
def read_json_file(cls, path):
        
        with open(path, 'r') as f:
            return cls.from_dict(json.load(f))
173664
def load_json(filename):
    """"""
    try:
        if PY2:
            args = 'rb'
        else:
            args = 'r'
        with open(filename, args) as fid:
            data = json.load(fid)
        return data, None
    except Exception as err:
        return None, str(err)
1265437
def load_result_json(result_path, json_file_name):
    """"""
    json_path = os.path.join(result_path, json_file_name)

    _list = []
    if os.path.isfile(json_path):
        with open(json_path) as json_data:
            try:
                _list = json.load(json_data)
            except ValueError as err:
                logger.error(
                    'Failed to load json: {}, {}'.format(json_path, err))

    return _list
716915
def load( filename ):
        
        try:
            f = open(filename, 'r')
            
        except IOError:
            logger.exception('Could not load the file: %s' % filename)
            return False
        
        strdata = f.read()
        f.close()
        
        return XViewProfile.fromString(strdata)
257232
def load_file(self, filename):
        """"""
        filename = os.path.abspath(filename)

        with open(filename) as f:
            self.load_dict(yaml.load(f))

        self._loaded_files.append(filename)
92415
def load(cls, filename):
        
        cls.load_counter_offset = StoreOptions.id_offset()
        val = pickle.load(filename)
        cls.load_counter_offset = None
        return val
122094
def _read_file(file_name):
    
    with open(file_name) as config_file:
        data = json.load(config_file)
    return data
1228514
def load_object_at_path(path):
    """"""
    with open(path, 'r') as f:
        data = _deserialize(f.read())
        return aadict(data)
154823
def load_json(file, new_root_dir=None, decompression=False):
    """"""
    if decompression:
        with open(file, 'rb') as f:
            my_object = load(f, decompression=decompression)
    else:
        with open(file, 'r') as f:
            my_object = load(f, decompression=decompression)
    if new_root_dir:
        my_object.root_dir = new_root_dir

    return my_object
1000242
def read_lte(self, filename):
        
        lpins = lattice.LteParser(filename)
        return json.loads(lpins.file2json())
341623
def load(self , filename=None, data=None):
        

        self.__load(filename=filename, data=data)