body stringlengths 26 98.2k | body_hash int64 -9,222,864,604,528,158,000 9,221,803,474B | docstring stringlengths 1 16.8k | path stringlengths 5 230 | name stringlengths 1 96 | repository_name stringlengths 7 89 | lang stringclasses 1
value | body_without_docstring stringlengths 20 98.2k |
|---|---|---|---|---|---|---|---|
def boosted_trees_predict(tree_ensemble_handle, bucketized_features, logits_dimension, name=None):
'Runs multiple additive regression ensemble predictors on input instances and\n\n computes the logits. It is designed to be used during prediction.\n It traverses all the trees and calculates the final score for eac... | 2,189,912,239,693,258,200 | Runs multiple additive regression ensemble predictors on input instances and
computes the logits. It is designed to be used during prediction.
It traverses all the trees and calculates the final score for each instance.
Args:
tree_ensemble_handle: A `Tensor` of type `resource`.
bucketized_features: A list of at l... | Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py | boosted_trees_predict | Con-Mi/lambda-packs | python | def boosted_trees_predict(tree_ensemble_handle, bucketized_features, logits_dimension, name=None):
'Runs multiple additive regression ensemble predictors on input instances and\n\n computes the logits. It is designed to be used during prediction.\n It traverses all the trees and calculates the final score for eac... |
def boosted_trees_predict_eager_fallback(tree_ensemble_handle, bucketized_features, logits_dimension, name=None, ctx=None):
'This is the slowpath function for Eager mode.\n This is for function boosted_trees_predict\n '
_ctx = (ctx if ctx else _context.context())
if (not isinstance(bucketized_features, (l... | -6,167,013,392,166,292,000 | This is the slowpath function for Eager mode.
This is for function boosted_trees_predict | Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py | boosted_trees_predict_eager_fallback | Con-Mi/lambda-packs | python | def boosted_trees_predict_eager_fallback(tree_ensemble_handle, bucketized_features, logits_dimension, name=None, ctx=None):
'This is the slowpath function for Eager mode.\n This is for function boosted_trees_predict\n '
_ctx = (ctx if ctx else _context.context())
if (not isinstance(bucketized_features, (l... |
def boosted_trees_serialize_ensemble(tree_ensemble_handle, name=None):
'Serializes the tree ensemble to a proto.\n\n Args:\n tree_ensemble_handle: A `Tensor` of type `resource`.\n Handle to the tree ensemble.\n name: A name for the operation (optional).\n\n Returns:\n A tuple of `Tensor` objects (st... | 5,663,834,042,271,118,000 | Serializes the tree ensemble to a proto.
Args:
tree_ensemble_handle: A `Tensor` of type `resource`.
Handle to the tree ensemble.
name: A name for the operation (optional).
Returns:
A tuple of `Tensor` objects (stamp_token, tree_ensemble_serialized).
stamp_token: A `Tensor` of type `int64`.
tree_ensembl... | Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py | boosted_trees_serialize_ensemble | Con-Mi/lambda-packs | python | def boosted_trees_serialize_ensemble(tree_ensemble_handle, name=None):
'Serializes the tree ensemble to a proto.\n\n Args:\n tree_ensemble_handle: A `Tensor` of type `resource`.\n Handle to the tree ensemble.\n name: A name for the operation (optional).\n\n Returns:\n A tuple of `Tensor` objects (st... |
def boosted_trees_serialize_ensemble_eager_fallback(tree_ensemble_handle, name=None, ctx=None):
'This is the slowpath function for Eager mode.\n This is for function boosted_trees_serialize_ensemble\n '
_ctx = (ctx if ctx else _context.context())
tree_ensemble_handle = _ops.convert_to_tensor(tree_ensemble... | -4,808,437,526,666,825,000 | This is the slowpath function for Eager mode.
This is for function boosted_trees_serialize_ensemble | Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py | boosted_trees_serialize_ensemble_eager_fallback | Con-Mi/lambda-packs | python | def boosted_trees_serialize_ensemble_eager_fallback(tree_ensemble_handle, name=None, ctx=None):
'This is the slowpath function for Eager mode.\n This is for function boosted_trees_serialize_ensemble\n '
_ctx = (ctx if ctx else _context.context())
tree_ensemble_handle = _ops.convert_to_tensor(tree_ensemble... |
def boosted_trees_training_predict(tree_ensemble_handle, cached_tree_ids, cached_node_ids, bucketized_features, logits_dimension, name=None):
'Runs multiple additive regression ensemble predictors on input instances and\n\n computes the update to cached logits. It is designed to be used during training.\n It trav... | 4,996,428,193,543,894,000 | Runs multiple additive regression ensemble predictors on input instances and
computes the update to cached logits. It is designed to be used during training.
It traverses the trees starting from cached tree id and cached node id and
calculates the updates to be pushed to the cache.
Args:
tree_ensemble_handle: A `Te... | Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py | boosted_trees_training_predict | Con-Mi/lambda-packs | python | def boosted_trees_training_predict(tree_ensemble_handle, cached_tree_ids, cached_node_ids, bucketized_features, logits_dimension, name=None):
'Runs multiple additive regression ensemble predictors on input instances and\n\n computes the update to cached logits. It is designed to be used during training.\n It trav... |
def boosted_trees_training_predict_eager_fallback(tree_ensemble_handle, cached_tree_ids, cached_node_ids, bucketized_features, logits_dimension, name=None, ctx=None):
'This is the slowpath function for Eager mode.\n This is for function boosted_trees_training_predict\n '
_ctx = (ctx if ctx else _context.conte... | -5,873,690,754,351,361,000 | This is the slowpath function for Eager mode.
This is for function boosted_trees_training_predict | Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py | boosted_trees_training_predict_eager_fallback | Con-Mi/lambda-packs | python | def boosted_trees_training_predict_eager_fallback(tree_ensemble_handle, cached_tree_ids, cached_node_ids, bucketized_features, logits_dimension, name=None, ctx=None):
'This is the slowpath function for Eager mode.\n This is for function boosted_trees_training_predict\n '
_ctx = (ctx if ctx else _context.conte... |
def boosted_trees_update_ensemble(tree_ensemble_handle, feature_ids, node_ids, gains, thresholds, left_node_contribs, right_node_contribs, max_depth, learning_rate, pruning_mode, name=None):
"Updates the tree ensemble by either adding a layer to the last tree being grown\n\n or by starting a new tree.\n\n Args:\n... | -1,718,888,198,187,871,200 | Updates the tree ensemble by either adding a layer to the last tree being grown
or by starting a new tree.
Args:
tree_ensemble_handle: A `Tensor` of type `resource`.
Handle to the ensemble variable.
feature_ids: A `Tensor` of type `int32`.
Rank 1 tensor with ids for each feature. This is the real id of
... | Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py | boosted_trees_update_ensemble | Con-Mi/lambda-packs | python | def boosted_trees_update_ensemble(tree_ensemble_handle, feature_ids, node_ids, gains, thresholds, left_node_contribs, right_node_contribs, max_depth, learning_rate, pruning_mode, name=None):
"Updates the tree ensemble by either adding a layer to the last tree being grown\n\n or by starting a new tree.\n\n Args:\n... |
def boosted_trees_update_ensemble_eager_fallback(tree_ensemble_handle, feature_ids, node_ids, gains, thresholds, left_node_contribs, right_node_contribs, max_depth, learning_rate, pruning_mode, name=None, ctx=None):
'This is the slowpath function for Eager mode.\n This is for function boosted_trees_update_ensemble... | 5,264,325,416,892,002,000 | This is the slowpath function for Eager mode.
This is for function boosted_trees_update_ensemble | Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py | boosted_trees_update_ensemble_eager_fallback | Con-Mi/lambda-packs | python | def boosted_trees_update_ensemble_eager_fallback(tree_ensemble_handle, feature_ids, node_ids, gains, thresholds, left_node_contribs, right_node_contribs, max_depth, learning_rate, pruning_mode, name=None, ctx=None):
'This is the slowpath function for Eager mode.\n This is for function boosted_trees_update_ensemble... |
def is_boosted_trees_ensemble_initialized(tree_ensemble_handle, name=None):
'Checks whether a tree ensemble has been initialized.\n\n Args:\n tree_ensemble_handle: A `Tensor` of type `resource`.\n Handle to the tree ensemble resouce.\n name: A name for the operation (optional).\n\n Returns:\n A `Ten... | -7,141,706,510,654,712,000 | Checks whether a tree ensemble has been initialized.
Args:
tree_ensemble_handle: A `Tensor` of type `resource`.
Handle to the tree ensemble resouce.
name: A name for the operation (optional).
Returns:
A `Tensor` of type `bool`. | Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py | is_boosted_trees_ensemble_initialized | Con-Mi/lambda-packs | python | def is_boosted_trees_ensemble_initialized(tree_ensemble_handle, name=None):
'Checks whether a tree ensemble has been initialized.\n\n Args:\n tree_ensemble_handle: A `Tensor` of type `resource`.\n Handle to the tree ensemble resouce.\n name: A name for the operation (optional).\n\n Returns:\n A `Ten... |
def is_boosted_trees_ensemble_initialized_eager_fallback(tree_ensemble_handle, name=None, ctx=None):
'This is the slowpath function for Eager mode.\n This is for function is_boosted_trees_ensemble_initialized\n '
_ctx = (ctx if ctx else _context.context())
tree_ensemble_handle = _ops.convert_to_tensor(tre... | -4,720,951,345,601,357,000 | This is the slowpath function for Eager mode.
This is for function is_boosted_trees_ensemble_initialized | Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py | is_boosted_trees_ensemble_initialized_eager_fallback | Con-Mi/lambda-packs | python | def is_boosted_trees_ensemble_initialized_eager_fallback(tree_ensemble_handle, name=None, ctx=None):
'This is the slowpath function for Eager mode.\n This is for function is_boosted_trees_ensemble_initialized\n '
_ctx = (ctx if ctx else _context.context())
tree_ensemble_handle = _ops.convert_to_tensor(tre... |
def get(name='default', tool=None):
'Load a profile by name. If tool is specified, the specs are\n searched to the tool and if found, the specs are applied.\n '
s = name.split(' ')
p = Profile()
for ss in s:
tup = ss.split('=')
if (len(tup) == 1):
l = Profile(profile=tu... | -4,386,867,688,206,611,000 | Load a profile by name. If tool is specified, the specs are
searched to the tool and if found, the specs are applied. | jip/profiles.py | get | VDBWRAIR/pyjip | python | def get(name='default', tool=None):
'Load a profile by name. If tool is specified, the specs are\n searched to the tool and if found, the specs are applied.\n '
s = name.split(' ')
p = Profile()
for ss in s:
tup = ss.split('=')
if (len(tup) == 1):
l = Profile(profile=tu... |
def get_specs(path=None):
'Load specs form default locations and then update from specs in given\n path if specified.\n\n :param path: optional path to an additional spec file\n '
def load_json(jf):
with open(jf) as of:
try:
data = json.load(of)
except V... | 6,262,297,116,974,644,000 | Load specs form default locations and then update from specs in given
path if specified.
:param path: optional path to an additional spec file | jip/profiles.py | get_specs | VDBWRAIR/pyjip | python | def get_specs(path=None):
'Load specs form default locations and then update from specs in given\n path if specified.\n\n :param path: optional path to an additional spec file\n '
def load_json(jf):
with open(jf) as of:
try:
data = json.load(of)
except V... |
def apply_to_pipeline(self, pipeline):
'Apply this profile to the pipeline\n\n :param pipeline: the pipeline\n :type pipeline: :class:`jip.pipeline.Pipeline`\n '
for node in pipeline.nodes():
self.apply_to_node(node) | -2,517,469,574,172,574,000 | Apply this profile to the pipeline
:param pipeline: the pipeline
:type pipeline: :class:`jip.pipeline.Pipeline` | jip/profiles.py | apply_to_pipeline | VDBWRAIR/pyjip | python | def apply_to_pipeline(self, pipeline):
'Apply this profile to the pipeline\n\n :param pipeline: the pipeline\n :type pipeline: :class:`jip.pipeline.Pipeline`\n '
for node in pipeline.nodes():
self.apply_to_node(node) |
@property
def err(self):
'Set the jobs error log file\n\n :getter: access the jobs name\n :setter: set the jobs name\n :type: string\n '
return self.log | -9,118,220,976,951,909,000 | Set the jobs error log file
:getter: access the jobs name
:setter: set the jobs name
:type: string | jip/profiles.py | err | VDBWRAIR/pyjip | python | @property
def err(self):
'Set the jobs error log file\n\n :getter: access the jobs name\n :setter: set the jobs name\n :type: string\n '
return self.log |
@property
def dir(self):
'Set the jobs working directory\n\n :getter: access the jobs working directory\n :setter: set the jobs working directory\n :type: string\n '
return self.working_dir | 7,015,927,195,201,332,000 | Set the jobs working directory
:getter: access the jobs working directory
:setter: set the jobs working directory
:type: string | jip/profiles.py | dir | VDBWRAIR/pyjip | python | @property
def dir(self):
'Set the jobs working directory\n\n :getter: access the jobs working directory\n :setter: set the jobs working directory\n :type: string\n '
return self.working_dir |
@property
def name(self):
'Set the jobs name\n\n :getter: access the jobs name\n :setter: set the jobs name\n :type: string\n '
return self._name | 5,520,016,232,128,242,000 | Set the jobs name
:getter: access the jobs name
:setter: set the jobs name
:type: string | jip/profiles.py | name | VDBWRAIR/pyjip | python | @property
def name(self):
'Set the jobs name\n\n :getter: access the jobs name\n :setter: set the jobs name\n :type: string\n '
return self._name |
def load(self, profile_name):
'Set this profiles values to the values loaded from the profile\n stored under the given name. An exception is raised if no profile of\n that name could be found.\n\n :param profile_name: the name of the profile that will be loaded\n :type profile_name: stri... | -6,359,191,593,366,046,000 | Set this profiles values to the values loaded from the profile
stored under the given name. An exception is raised if no profile of
that name could be found.
:param profile_name: the name of the profile that will be loaded
:type profile_name: string | jip/profiles.py | load | VDBWRAIR/pyjip | python | def load(self, profile_name):
'Set this profiles values to the values loaded from the profile\n stored under the given name. An exception is raised if no profile of\n that name could be found.\n\n :param profile_name: the name of the profile that will be loaded\n :type profile_name: stri... |
def load_args(self, args):
'Update this profile from the given dictionary of command line\n arguments. The argument names must match the profile attributes\n '
for (k, v) in args.iteritems():
k = re.sub('^-+', '', k)
k = re.sub('-', '_', k)
if (v and hasattr(self, k)):
... | 4,070,589,057,203,432,000 | Update this profile from the given dictionary of command line
arguments. The argument names must match the profile attributes | jip/profiles.py | load_args | VDBWRAIR/pyjip | python | def load_args(self, args):
'Update this profile from the given dictionary of command line\n arguments. The argument names must match the profile attributes\n '
for (k, v) in args.iteritems():
k = re.sub('^-+', , k)
k = re.sub('-', '_', k)
if (v and hasattr(self, k)):
... |
def apply_overwrite(self, job):
'Apply the profile and overwrite all settings that are set\n in this profile\n '
log.debug('Profiles | Overwriting job profile to %s', job)
if self.name:
job.name = self._render_job_name(job)
if self.threads:
job.threads = int(self.threads)
... | -5,163,799,074,057,687,000 | Apply the profile and overwrite all settings that are set
in this profile | jip/profiles.py | apply_overwrite | VDBWRAIR/pyjip | python | def apply_overwrite(self, job):
'Apply the profile and overwrite all settings that are set\n in this profile\n '
log.debug('Profiles | Overwriting job profile to %s', job)
if self.name:
job.name = self._render_job_name(job)
if self.threads:
job.threads = int(self.threads)
... |
def apply(self, job, pipeline=False, overwrite=False):
'Apply this profile to the given job.'
log.debug('Profiles | Applying job profile to %s', job)
if overwrite:
self.apply_overwrite(job)
return
if (not pipeline):
job.name = self._render_job_name(job)
elif (self.name is not... | -7,001,295,115,198,891,000 | Apply this profile to the given job. | jip/profiles.py | apply | VDBWRAIR/pyjip | python | def apply(self, job, pipeline=False, overwrite=False):
log.debug('Profiles | Applying job profile to %s', job)
if overwrite:
self.apply_overwrite(job)
return
if (not pipeline):
job.name = self._render_job_name(job)
elif (self.name is not None):
log.info('Apply pipeli... |
def update(self, profile, overwrite=True):
'Update this profile from a given profile. All values that are\n not None in the other profile are applied to this\n profile\n\n :param profile: the other profile\n :type profile: :class:`Profile`\n :param overwrite: if True, value will b... | 6,928,398,125,538,205,000 | Update this profile from a given profile. All values that are
not None in the other profile are applied to this
profile
:param profile: the other profile
:type profile: :class:`Profile`
:param overwrite: if True, value will be set regardless. Otherwise, the
new value will only be applied if the old v... | jip/profiles.py | update | VDBWRAIR/pyjip | python | def update(self, profile, overwrite=True):
'Update this profile from a given profile. All values that are\n not None in the other profile are applied to this\n profile\n\n :param profile: the other profile\n :type profile: :class:`Profile`\n :param overwrite: if True, value will b... |
def merge(self, master):
'Merge this profile with the given master profile.\n\n Currently this merges the working directory of jobs\n\n :param master: the master profile\n '
self.working_dir = (master.working_dir if (self.working_dir is None) else self.working_dir) | 7,669,131,453,964,874,000 | Merge this profile with the given master profile.
Currently this merges the working directory of jobs
:param master: the master profile | jip/profiles.py | merge | VDBWRAIR/pyjip | python | def merge(self, master):
'Merge this profile with the given master profile.\n\n Currently this merges the working directory of jobs\n\n :param master: the master profile\n '
self.working_dir = (master.working_dir if (self.working_dir is None) else self.working_dir) |
@classmethod
def from_job(cls, job):
'Create a profile based on a given job. All properties\n are set according to the given job, except the jobs temp state,\n which will be kept unmodified.\n\n :param job: the job\n :returns: new profile generated from the job\n '
profile = c... | 1,635,524,039,944,568,600 | Create a profile based on a given job. All properties
are set according to the given job, except the jobs temp state,
which will be kept unmodified.
:param job: the job
:returns: new profile generated from the job | jip/profiles.py | from_job | VDBWRAIR/pyjip | python | @classmethod
def from_job(cls, job):
'Create a profile based on a given job. All properties\n are set according to the given job, except the jobs temp state,\n which will be kept unmodified.\n\n :param job: the job\n :returns: new profile generated from the job\n '
profile = c... |
@classmethod
def from_file(cls, file_name):
'Load a profile from a json file\n\n :param file_name: the name of the input file\n '
with open(file_name) as of:
try:
data = json.load(of)
except ValueError:
log.error('Malformed json file %s', file_name)
... | -8,192,833,256,130,372,000 | Load a profile from a json file
:param file_name: the name of the input file | jip/profiles.py | from_file | VDBWRAIR/pyjip | python | @classmethod
def from_file(cls, file_name):
'Load a profile from a json file\n\n :param file_name: the name of the input file\n '
with open(file_name) as of:
try:
data = json.load(of)
except ValueError:
log.error('Malformed json file %s', file_name)
... |
@classmethod
def from_dict(cls, data):
'Load a profile from a dictionary'
profile = cls()
for (k, v) in data.iteritems():
if (k != 'jobs'):
profile.__setattr__(k, v)
if ('jobs' in data):
for (name, spec) in data['jobs'].iteritems():
profile.specs[name] = cls.from_... | 4,905,723,379,121,253,000 | Load a profile from a dictionary | jip/profiles.py | from_dict | VDBWRAIR/pyjip | python | @classmethod
def from_dict(cls, data):
profile = cls()
for (k, v) in data.iteritems():
if (k != 'jobs'):
profile.__setattr__(k, v)
if ('jobs' in data):
for (name, spec) in data['jobs'].iteritems():
profile.specs[name] = cls.from_dict(spec)
return profile |
def find_docs():
'Yields files as per the whitelist.'
loc = '../doc/source/{}.rst'
whitelist = ['about', 'installation', 'configuration', 'commands', 'running', 'logging', 'test-anatomy', 'unittests', 'contributing']
for fname in whitelist:
fpath = loc.format(fname)
if os.path.isfile(fpa... | -4,493,309,502,573,737,500 | Yields files as per the whitelist. | scripts/readme.py | find_docs | abdullahzamanbabar/syntribos | python | def find_docs():
loc = '../doc/source/{}.rst'
whitelist = ['about', 'installation', 'configuration', 'commands', 'running', 'logging', 'test-anatomy', 'unittests', 'contributing']
for fname in whitelist:
fpath = loc.format(fname)
if os.path.isfile(fpath):
(yield fpath) |
def concat_docs():
'Concatinates files yielded by the generator `find_docs`.'
file_path = os.path.dirname(os.path.realpath(__file__))
(head, tail) = os.path.split(file_path)
outfile = (head + '/README.rst')
if (not os.path.isfile(outfile)):
print('../README.rst not found, exiting!')
... | 3,950,141,068,991,426,600 | Concatinates files yielded by the generator `find_docs`. | scripts/readme.py | concat_docs | abdullahzamanbabar/syntribos | python | def concat_docs():
file_path = os.path.dirname(os.path.realpath(__file__))
(head, tail) = os.path.split(file_path)
outfile = (head + '/README.rst')
if (not os.path.isfile(outfile)):
print('../README.rst not found, exiting!')
exit(1)
with open(outfile, 'w') as readme_handle:
... |
def get_data_loaders(batch_size: int, model):
'Helper method to create dataloaders for ssl, kNN train and kNN test\n\n Args:\n batch_size: Desired batch size for all dataloaders\n '
col_fn = collate_fn
if isinstance(model, SwaVModel):
col_fn = swav_collate_fn
elif isinstance(model, ... | -1,410,701,609,825,753,000 | Helper method to create dataloaders for ssl, kNN train and kNN test
Args:
batch_size: Desired batch size for all dataloaders | docs/source/getting_started/benchmarks/cifar10_benchmark.py | get_data_loaders | dczifra/lightly | python | def get_data_loaders(batch_size: int, model):
'Helper method to create dataloaders for ssl, kNN train and kNN test\n\n Args:\n batch_size: Desired batch size for all dataloaders\n '
col_fn = collate_fn
if isinstance(model, SwaVModel):
col_fn = swav_collate_fn
elif isinstance(model, ... |
def setup_data(self, path):
'\n Adds additional perspectives. For example, in the conversation:\n\n x1 y1\n x2 y2\n x3\n\n Creates the additional dialog:\n\n y1 x2\n y2 x3\n '
alternate = []
for (entry, new) in super().setup_data(path):
if new:... | 5,024,126,366,058,978,000 | Adds additional perspectives. For example, in the conversation:
x1 y1
x2 y2
x3
Creates the additional dialog:
y1 x2
y2 x3 | doc/integrations/pytorch/parlai/tasks/cornell_movie/agents.py | setup_data | GuillaumeLeclerc/cortx | python | def setup_data(self, path):
'\n Adds additional perspectives. For example, in the conversation:\n\n x1 y1\n x2 y2\n x3\n\n Creates the additional dialog:\n\n y1 x2\n y2 x3\n '
alternate = []
for (entry, new) in super().setup_data(path):
if new:... |
def tearDown(self):
'Clean up the database, delete tables and functions. '
cursor = self.connection.cursor()
cursor.execute('\n TRUNCATE data_dictionary CASCADE\n ')
self.connection.commit()
super(IntegrationTestField, self).tearDown() | -7,246,195,938,868,994,000 | Clean up the database, delete tables and functions. | socorro/unittest/external/postgresql/test_field.py | tearDown | Acidburn0zzz/socorro | python | def tearDown(self):
' '
cursor = self.connection.cursor()
cursor.execute('\n TRUNCATE data_dictionary CASCADE\n ')
self.connection.commit()
super(IntegrationTestField, self).tearDown() |
def _isscalar(x):
'\n Check whether x is if a scalar type, or 0-dim.\n\n Parameters\n ----------\n x : anything\n An input to be checked for scalar-ness.\n\n Returns\n -------\n is_scalar : boolean\n True if the input is a scalar, False otherwise.\n '
return (np.isscalar(x)... | -5,589,859,407,075,775,000 | Check whether x is if a scalar type, or 0-dim.
Parameters
----------
x : anything
An input to be checked for scalar-ness.
Returns
-------
is_scalar : boolean
True if the input is a scalar, False otherwise. | HARK/interpolation.py | _isscalar | cohenimhuji/HARK | python | def _isscalar(x):
'\n Check whether x is if a scalar type, or 0-dim.\n\n Parameters\n ----------\n x : anything\n An input to be checked for scalar-ness.\n\n Returns\n -------\n is_scalar : boolean\n True if the input is a scalar, False otherwise.\n '
return (np.isscalar(x)... |
def calcLogSumChoiceProbs(Vals, sigma):
'\n Returns the final optimal value and choice probabilities given the choice\n specific value functions `Vals`. Probabilities are degenerate if sigma == 0.0.\n Parameters\n ----------\n Vals : [numpy.array]\n A numpy.array that holds choice specific val... | -8,109,232,112,225,450,000 | Returns the final optimal value and choice probabilities given the choice
specific value functions `Vals`. Probabilities are degenerate if sigma == 0.0.
Parameters
----------
Vals : [numpy.array]
A numpy.array that holds choice specific values at common grid points.
sigma : float
A number that controls the vari... | HARK/interpolation.py | calcLogSumChoiceProbs | cohenimhuji/HARK | python | def calcLogSumChoiceProbs(Vals, sigma):
'\n Returns the final optimal value and choice probabilities given the choice\n specific value functions `Vals`. Probabilities are degenerate if sigma == 0.0.\n Parameters\n ----------\n Vals : [numpy.array]\n A numpy.array that holds choice specific val... |
def calcChoiceProbs(Vals, sigma):
'\n Returns the choice probabilities given the choice specific value functions\n `Vals`. Probabilities are degenerate if sigma == 0.0.\n Parameters\n ----------\n Vals : [numpy.array]\n A numpy.array that holds choice specific values at common grid points.\n ... | -5,392,378,735,282,516,000 | Returns the choice probabilities given the choice specific value functions
`Vals`. Probabilities are degenerate if sigma == 0.0.
Parameters
----------
Vals : [numpy.array]
A numpy.array that holds choice specific values at common grid points.
sigma : float
A number that controls the variance of the taste shocks... | HARK/interpolation.py | calcChoiceProbs | cohenimhuji/HARK | python | def calcChoiceProbs(Vals, sigma):
'\n Returns the choice probabilities given the choice specific value functions\n `Vals`. Probabilities are degenerate if sigma == 0.0.\n Parameters\n ----------\n Vals : [numpy.array]\n A numpy.array that holds choice specific values at common grid points.\n ... |
def calcLogSum(Vals, sigma):
'\n Returns the optimal value given the choice specific value functions Vals.\n Parameters\n ----------\n Vals : [numpy.array]\n A numpy.array that holds choice specific values at common grid points.\n sigma : float\n A number that controls the variance of t... | -5,382,952,211,769,793,000 | Returns the optimal value given the choice specific value functions Vals.
Parameters
----------
Vals : [numpy.array]
A numpy.array that holds choice specific values at common grid points.
sigma : float
A number that controls the variance of the taste shocks
Returns
-------
V : [numpy.array]
A numpy.array th... | HARK/interpolation.py | calcLogSum | cohenimhuji/HARK | python | def calcLogSum(Vals, sigma):
'\n Returns the optimal value given the choice specific value functions Vals.\n Parameters\n ----------\n Vals : [numpy.array]\n A numpy.array that holds choice specific values at common grid points.\n sigma : float\n A number that controls the variance of t... |
def __call__(self, x):
'\n Evaluates the interpolated function at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.\n\n Returns\n -------\n y : np.array or float\n Th... | -6,247,232,095,514,035,000 | Evaluates the interpolated function at the given input.
Parameters
----------
x : np.array or float
Real values to be evaluated in the interpolated function.
Returns
-------
y : np.array or float
The interpolated function evaluated at x: y = f(x), with the same
shape as x. | HARK/interpolation.py | __call__ | cohenimhuji/HARK | python | def __call__(self, x):
'\n Evaluates the interpolated function at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.\n\n Returns\n -------\n y : np.array or float\n Th... |
def derivative(self, x):
"\n Evaluates the derivative of the interpolated function at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.\n\n Returns\n -------\n dydx : np.array o... | -4,085,258,743,740,778,000 | Evaluates the derivative of the interpolated function at the given input.
Parameters
----------
x : np.array or float
Real values to be evaluated in the interpolated function.
Returns
-------
dydx : np.array or float
The interpolated function's first derivative evaluated at x:
dydx = f'(x), with the same ... | HARK/interpolation.py | derivative | cohenimhuji/HARK | python | def derivative(self, x):
"\n Evaluates the derivative of the interpolated function at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.\n\n Returns\n -------\n dydx : np.array o... |
def eval_with_derivative(self, x):
"\n Evaluates the interpolated function and its derivative at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.\n\n Returns\n -------\n y : np... | -3,044,315,355,937,710,600 | Evaluates the interpolated function and its derivative at the given input.
Parameters
----------
x : np.array or float
Real values to be evaluated in the interpolated function.
Returns
-------
y : np.array or float
The interpolated function evaluated at x: y = f(x), with the same
shape as x.
dydx : np.arr... | HARK/interpolation.py | eval_with_derivative | cohenimhuji/HARK | python | def eval_with_derivative(self, x):
"\n Evaluates the interpolated function and its derivative at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.\n\n Returns\n -------\n y : np... |
def _evaluate(self, x):
'\n Interpolated function evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | -2,762,862,387,833,791,500 | Interpolated function evaluator, to be defined in subclasses. | HARK/interpolation.py | _evaluate | cohenimhuji/HARK | python | def _evaluate(self, x):
'\n \n '
raise NotImplementedError() |
def _der(self, x):
'\n Interpolated function derivative evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | -7,585,230,399,061,635,000 | Interpolated function derivative evaluator, to be defined in subclasses. | HARK/interpolation.py | _der | cohenimhuji/HARK | python | def _der(self, x):
'\n \n '
raise NotImplementedError() |
def _evalAndDer(self, x):
'\n Interpolated function and derivative evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | -8,138,018,477,864,143,000 | Interpolated function and derivative evaluator, to be defined in subclasses. | HARK/interpolation.py | _evalAndDer | cohenimhuji/HARK | python | def _evalAndDer(self, x):
'\n \n '
raise NotImplementedError() |
def __call__(self, x, y):
'\n Evaluates the interpolated function at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.\n y : np.array or float\n Real values to be evaluated in the ... | -3,649,113,944,786,035,700 | Evaluates the interpolated function at the given input.
Parameters
----------
x : np.array or float
Real values to be evaluated in the interpolated function.
y : np.array or float
Real values to be evaluated in the interpolated function; must be
the same size as x.
Returns
-------
fxy : np.array or float
... | HARK/interpolation.py | __call__ | cohenimhuji/HARK | python | def __call__(self, x, y):
'\n Evaluates the interpolated function at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.\n y : np.array or float\n Real values to be evaluated in the ... |
def derivativeX(self, x, y):
'\n Evaluates the partial derivative of interpolated function with respect\n to x (the first argument) at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.\n ... | -5,819,444,738,102,269,000 | Evaluates the partial derivative of interpolated function with respect
to x (the first argument) at the given input.
Parameters
----------
x : np.array or float
Real values to be evaluated in the interpolated function.
y : np.array or float
Real values to be evaluated in the interpolated function; must be
... | HARK/interpolation.py | derivativeX | cohenimhuji/HARK | python | def derivativeX(self, x, y):
'\n Evaluates the partial derivative of interpolated function with respect\n to x (the first argument) at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.\n ... |
def derivativeY(self, x, y):
'\n Evaluates the partial derivative of interpolated function with respect\n to y (the second argument) at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.\n ... | 1,417,053,829,423,489,300 | Evaluates the partial derivative of interpolated function with respect
to y (the second argument) at the given input.
Parameters
----------
x : np.array or float
Real values to be evaluated in the interpolated function.
y : np.array or float
Real values to be evaluated in the interpolated function; must be
... | HARK/interpolation.py | derivativeY | cohenimhuji/HARK | python | def derivativeY(self, x, y):
'\n Evaluates the partial derivative of interpolated function with respect\n to y (the second argument) at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.\n ... |
def _evaluate(self, x, y):
'\n Interpolated function evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | 8,579,099,796,809,700,000 | Interpolated function evaluator, to be defined in subclasses. | HARK/interpolation.py | _evaluate | cohenimhuji/HARK | python | def _evaluate(self, x, y):
'\n \n '
raise NotImplementedError() |
def _derX(self, x, y):
'\n Interpolated function x-derivative evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | 1,381,617,938,470,823,700 | Interpolated function x-derivative evaluator, to be defined in subclasses. | HARK/interpolation.py | _derX | cohenimhuji/HARK | python | def _derX(self, x, y):
'\n \n '
raise NotImplementedError() |
def _derY(self, x, y):
'\n Interpolated function y-derivative evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | 4,368,658,704,194,012,000 | Interpolated function y-derivative evaluator, to be defined in subclasses. | HARK/interpolation.py | _derY | cohenimhuji/HARK | python | def _derY(self, x, y):
'\n \n '
raise NotImplementedError() |
def __call__(self, x, y, z):
'\n Evaluates the interpolated function at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.\n y : np.array or float\n Real values to be evaluated in t... | 551,276,006,194,025,900 | Evaluates the interpolated function at the given input.
Parameters
----------
x : np.array or float
Real values to be evaluated in the interpolated function.
y : np.array or float
Real values to be evaluated in the interpolated function; must be
the same size as x.
z : np.array or float
Real values to ... | HARK/interpolation.py | __call__ | cohenimhuji/HARK | python | def __call__(self, x, y, z):
'\n Evaluates the interpolated function at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.\n y : np.array or float\n Real values to be evaluated in t... |
def derivativeX(self, x, y, z):
'\n Evaluates the partial derivative of the interpolated function with respect\n to x (the first argument) at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.... | 8,727,188,151,992,679,000 | Evaluates the partial derivative of the interpolated function with respect
to x (the first argument) at the given input.
Parameters
----------
x : np.array or float
Real values to be evaluated in the interpolated function.
y : np.array or float
Real values to be evaluated in the interpolated function; must be
... | HARK/interpolation.py | derivativeX | cohenimhuji/HARK | python | def derivativeX(self, x, y, z):
'\n Evaluates the partial derivative of the interpolated function with respect\n to x (the first argument) at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.... |
def derivativeY(self, x, y, z):
'\n Evaluates the partial derivative of the interpolated function with respect\n to y (the second argument) at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function... | 4,617,695,424,958,355,000 | Evaluates the partial derivative of the interpolated function with respect
to y (the second argument) at the given input.
Parameters
----------
x : np.array or float
Real values to be evaluated in the interpolated function.
y : np.array or float
Real values to be evaluated in the interpolated function; must be... | HARK/interpolation.py | derivativeY | cohenimhuji/HARK | python | def derivativeY(self, x, y, z):
'\n Evaluates the partial derivative of the interpolated function with respect\n to y (the second argument) at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function... |
def derivativeZ(self, x, y, z):
'\n Evaluates the partial derivative of the interpolated function with respect\n to z (the third argument) at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.... | -6,464,544,506,066,715,000 | Evaluates the partial derivative of the interpolated function with respect
to z (the third argument) at the given input.
Parameters
----------
x : np.array or float
Real values to be evaluated in the interpolated function.
y : np.array or float
Real values to be evaluated in the interpolated function; must be
... | HARK/interpolation.py | derivativeZ | cohenimhuji/HARK | python | def derivativeZ(self, x, y, z):
'\n Evaluates the partial derivative of the interpolated function with respect\n to z (the third argument) at the given input.\n\n Parameters\n ----------\n x : np.array or float\n Real values to be evaluated in the interpolated function.... |
def _evaluate(self, x, y, z):
'\n Interpolated function evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | -1,267,314,504,862,056,200 | Interpolated function evaluator, to be defined in subclasses. | HARK/interpolation.py | _evaluate | cohenimhuji/HARK | python | def _evaluate(self, x, y, z):
'\n \n '
raise NotImplementedError() |
def _derX(self, x, y, z):
'\n Interpolated function x-derivative evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | -4,115,489,812,479,911,400 | Interpolated function x-derivative evaluator, to be defined in subclasses. | HARK/interpolation.py | _derX | cohenimhuji/HARK | python | def _derX(self, x, y, z):
'\n \n '
raise NotImplementedError() |
def _derY(self, x, y, z):
'\n Interpolated function y-derivative evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | -8,729,575,380,917,093,000 | Interpolated function y-derivative evaluator, to be defined in subclasses. | HARK/interpolation.py | _derY | cohenimhuji/HARK | python | def _derY(self, x, y, z):
'\n \n '
raise NotImplementedError() |
def _derZ(self, x, y, z):
'\n Interpolated function y-derivative evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | 5,043,320,771,869,896,000 | Interpolated function y-derivative evaluator, to be defined in subclasses. | HARK/interpolation.py | _derZ | cohenimhuji/HARK | python | def _derZ(self, x, y, z):
'\n \n '
raise NotImplementedError() |
def __call__(self, w, x, y, z):
'\n Evaluates the interpolated function at the given input.\n\n Parameters\n ----------\n w : np.array or float\n Real values to be evaluated in the interpolated function.\n x : np.array or float\n Real values to be evaluated i... | -2,837,734,873,584,436,000 | Evaluates the interpolated function at the given input.
Parameters
----------
w : np.array or float
Real values to be evaluated in the interpolated function.
x : np.array or float
Real values to be evaluated in the interpolated function; must be
the same size as w.
y : np.array or float
Real values to ... | HARK/interpolation.py | __call__ | cohenimhuji/HARK | python | def __call__(self, w, x, y, z):
'\n Evaluates the interpolated function at the given input.\n\n Parameters\n ----------\n w : np.array or float\n Real values to be evaluated in the interpolated function.\n x : np.array or float\n Real values to be evaluated i... |
def derivativeW(self, w, x, y, z):
'\n Evaluates the partial derivative with respect to w (the first argument)\n of the interpolated function at the given input.\n\n Parameters\n ----------\n w : np.array or float\n Real values to be evaluated in the interpolated functi... | -5,169,940,638,093,548,000 | Evaluates the partial derivative with respect to w (the first argument)
of the interpolated function at the given input.
Parameters
----------
w : np.array or float
Real values to be evaluated in the interpolated function.
x : np.array or float
Real values to be evaluated in the interpolated function; must be
... | HARK/interpolation.py | derivativeW | cohenimhuji/HARK | python | def derivativeW(self, w, x, y, z):
'\n Evaluates the partial derivative with respect to w (the first argument)\n of the interpolated function at the given input.\n\n Parameters\n ----------\n w : np.array or float\n Real values to be evaluated in the interpolated functi... |
def derivativeX(self, w, x, y, z):
'\n Evaluates the partial derivative with respect to x (the second argument)\n of the interpolated function at the given input.\n\n Parameters\n ----------\n w : np.array or float\n Real values to be evaluated in the interpolated funct... | -5,980,737,189,385,176,000 | Evaluates the partial derivative with respect to x (the second argument)
of the interpolated function at the given input.
Parameters
----------
w : np.array or float
Real values to be evaluated in the interpolated function.
x : np.array or float
Real values to be evaluated in the interpolated function; must be... | HARK/interpolation.py | derivativeX | cohenimhuji/HARK | python | def derivativeX(self, w, x, y, z):
'\n Evaluates the partial derivative with respect to x (the second argument)\n of the interpolated function at the given input.\n\n Parameters\n ----------\n w : np.array or float\n Real values to be evaluated in the interpolated funct... |
def derivativeY(self, w, x, y, z):
'\n Evaluates the partial derivative with respect to y (the third argument)\n of the interpolated function at the given input.\n\n Parameters\n ----------\n w : np.array or float\n Real values to be evaluated in the interpolated functi... | 7,829,811,567,842,157,000 | Evaluates the partial derivative with respect to y (the third argument)
of the interpolated function at the given input.
Parameters
----------
w : np.array or float
Real values to be evaluated in the interpolated function.
x : np.array or float
Real values to be evaluated in the interpolated function; must be
... | HARK/interpolation.py | derivativeY | cohenimhuji/HARK | python | def derivativeY(self, w, x, y, z):
'\n Evaluates the partial derivative with respect to y (the third argument)\n of the interpolated function at the given input.\n\n Parameters\n ----------\n w : np.array or float\n Real values to be evaluated in the interpolated functi... |
def derivativeZ(self, w, x, y, z):
'\n Evaluates the partial derivative with respect to z (the fourth argument)\n of the interpolated function at the given input.\n\n Parameters\n ----------\n w : np.array or float\n Real values to be evaluated in the interpolated funct... | 4,949,201,771,310,799,000 | Evaluates the partial derivative with respect to z (the fourth argument)
of the interpolated function at the given input.
Parameters
----------
w : np.array or float
Real values to be evaluated in the interpolated function.
x : np.array or float
Real values to be evaluated in the interpolated function; must be... | HARK/interpolation.py | derivativeZ | cohenimhuji/HARK | python | def derivativeZ(self, w, x, y, z):
'\n Evaluates the partial derivative with respect to z (the fourth argument)\n of the interpolated function at the given input.\n\n Parameters\n ----------\n w : np.array or float\n Real values to be evaluated in the interpolated funct... |
def _evaluate(self, w, x, y, z):
'\n Interpolated function evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | 1,283,801,718,147,212,500 | Interpolated function evaluator, to be defined in subclasses. | HARK/interpolation.py | _evaluate | cohenimhuji/HARK | python | def _evaluate(self, w, x, y, z):
'\n \n '
raise NotImplementedError() |
def _derW(self, w, x, y, z):
'\n Interpolated function w-derivative evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | 2,038,132,461,415,581,200 | Interpolated function w-derivative evaluator, to be defined in subclasses. | HARK/interpolation.py | _derW | cohenimhuji/HARK | python | def _derW(self, w, x, y, z):
'\n \n '
raise NotImplementedError() |
def _derX(self, w, x, y, z):
'\n Interpolated function w-derivative evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | -857,282,721,956,864,000 | Interpolated function w-derivative evaluator, to be defined in subclasses. | HARK/interpolation.py | _derX | cohenimhuji/HARK | python | def _derX(self, w, x, y, z):
'\n \n '
raise NotImplementedError() |
def _derY(self, w, x, y, z):
'\n Interpolated function w-derivative evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | -775,814,225,664,724,600 | Interpolated function w-derivative evaluator, to be defined in subclasses. | HARK/interpolation.py | _derY | cohenimhuji/HARK | python | def _derY(self, w, x, y, z):
'\n \n '
raise NotImplementedError() |
def _derZ(self, w, x, y, z):
'\n Interpolated function w-derivative evaluator, to be defined in subclasses.\n '
raise NotImplementedError() | 6,938,501,573,206,768,000 | Interpolated function w-derivative evaluator, to be defined in subclasses. | HARK/interpolation.py | _derZ | cohenimhuji/HARK | python | def _derZ(self, w, x, y, z):
'\n \n '
raise NotImplementedError() |
def __init__(self, i_dim=0, n_dims=1):
'\n Constructor for a new IdentityFunction.\n\n Parameters\n ----------\n i_dim : int\n Index of the dimension on which the identity is defined. f(*x) = x[i]\n n_dims : int\n Total number of input dimensions for this fu... | -8,362,144,971,293,894,000 | Constructor for a new IdentityFunction.
Parameters
----------
i_dim : int
Index of the dimension on which the identity is defined. f(*x) = x[i]
n_dims : int
Total number of input dimensions for this function.
Returns
-------
None | HARK/interpolation.py | __init__ | cohenimhuji/HARK | python | def __init__(self, i_dim=0, n_dims=1):
'\n Constructor for a new IdentityFunction.\n\n Parameters\n ----------\n i_dim : int\n Index of the dimension on which the identity is defined. f(*x) = x[i]\n n_dims : int\n Total number of input dimensions for this fu... |
def __call__(self, *args):
'\n Evaluate the identity function.\n '
return args[self.i_dim] | -8,692,210,192,518,422,000 | Evaluate the identity function. | HARK/interpolation.py | __call__ | cohenimhuji/HARK | python | def __call__(self, *args):
'\n \n '
return args[self.i_dim] |
def derivative(self, *args):
'\n Returns the derivative of the function with respect to the first dimension.\n '
if (self.i_dim == 0):
return np.ones_like(*args[0])
else:
return np.zeros_like(*args[0]) | 6,439,382,352,633,113,000 | Returns the derivative of the function with respect to the first dimension. | HARK/interpolation.py | derivative | cohenimhuji/HARK | python | def derivative(self, *args):
'\n \n '
if (self.i_dim == 0):
return np.ones_like(*args[0])
else:
return np.zeros_like(*args[0]) |
def derivativeX(self, *args):
'\n Returns the derivative of the function with respect to the X dimension.\n This is the first input whenever n_dims < 4 and the second input otherwise.\n '
if (self.n_dims >= 4):
j = 1
else:
j = 0
if (self.i_dim == j):
return n... | -5,051,048,792,419,859,000 | Returns the derivative of the function with respect to the X dimension.
This is the first input whenever n_dims < 4 and the second input otherwise. | HARK/interpolation.py | derivativeX | cohenimhuji/HARK | python | def derivativeX(self, *args):
'\n Returns the derivative of the function with respect to the X dimension.\n This is the first input whenever n_dims < 4 and the second input otherwise.\n '
if (self.n_dims >= 4):
j = 1
else:
j = 0
if (self.i_dim == j):
return n... |
def derivativeY(self, *args):
'\n Returns the derivative of the function with respect to the Y dimension.\n This is the second input whenever n_dims < 4 and the third input otherwise.\n '
if (self.n_dims >= 4):
j = 2
else:
j = 1
if (self.i_dim == j):
return n... | -4,896,925,797,013,075,000 | Returns the derivative of the function with respect to the Y dimension.
This is the second input whenever n_dims < 4 and the third input otherwise. | HARK/interpolation.py | derivativeY | cohenimhuji/HARK | python | def derivativeY(self, *args):
'\n Returns the derivative of the function with respect to the Y dimension.\n This is the second input whenever n_dims < 4 and the third input otherwise.\n '
if (self.n_dims >= 4):
j = 2
else:
j = 1
if (self.i_dim == j):
return n... |
def derivativeZ(self, *args):
'\n Returns the derivative of the function with respect to the Z dimension.\n This is the third input whenever n_dims < 4 and the fourth input otherwise.\n '
if (self.n_dims >= 4):
j = 3
else:
j = 2
if (self.i_dim == j):
return n... | -6,145,434,911,555,888,000 | Returns the derivative of the function with respect to the Z dimension.
This is the third input whenever n_dims < 4 and the fourth input otherwise. | HARK/interpolation.py | derivativeZ | cohenimhuji/HARK | python | def derivativeZ(self, *args):
'\n Returns the derivative of the function with respect to the Z dimension.\n This is the third input whenever n_dims < 4 and the fourth input otherwise.\n '
if (self.n_dims >= 4):
j = 3
else:
j = 2
if (self.i_dim == j):
return n... |
def derivativeW(self, *args):
'\n Returns the derivative of the function with respect to the W dimension.\n This should only exist when n_dims >= 4.\n '
if (self.n_dims >= 4):
j = 0
else:
assert False, "Derivative with respect to W can't be called when n_dims < 4!"
i... | -6,151,810,293,431,523,000 | Returns the derivative of the function with respect to the W dimension.
This should only exist when n_dims >= 4. | HARK/interpolation.py | derivativeW | cohenimhuji/HARK | python | def derivativeW(self, *args):
'\n Returns the derivative of the function with respect to the W dimension.\n This should only exist when n_dims >= 4.\n '
if (self.n_dims >= 4):
j = 0
else:
assert False, "Derivative with respect to W can't be called when n_dims < 4!"
i... |
def __init__(self, value):
'\n Make a new ConstantFunction object.\n\n Parameters\n ----------\n value : float\n The constant value that the function returns.\n\n Returns\n -------\n None\n '
self.value = float(value) | -5,470,336,126,520,096,000 | Make a new ConstantFunction object.
Parameters
----------
value : float
The constant value that the function returns.
Returns
-------
None | HARK/interpolation.py | __init__ | cohenimhuji/HARK | python | def __init__(self, value):
'\n Make a new ConstantFunction object.\n\n Parameters\n ----------\n value : float\n The constant value that the function returns.\n\n Returns\n -------\n None\n '
self.value = float(value) |
def __call__(self, *args):
'\n Evaluate the constant function. The first input must exist and should be an array.\n Returns an array of identical shape to args[0] (if it exists).\n '
if (len(args) > 0):
if _isscalar(args[0]):
return self.value
else:
... | -3,629,823,588,914,564,600 | Evaluate the constant function. The first input must exist and should be an array.
Returns an array of identical shape to args[0] (if it exists). | HARK/interpolation.py | __call__ | cohenimhuji/HARK | python | def __call__(self, *args):
'\n Evaluate the constant function. The first input must exist and should be an array.\n Returns an array of identical shape to args[0] (if it exists).\n '
if (len(args) > 0):
if _isscalar(args[0]):
return self.value
else:
... |
def _der(self, *args):
'\n Evaluate the derivative of the function. The first input must exist and should be an array.\n Returns an array of identical shape to args[0] (if it exists). This is an array of zeros.\n '
if (len(args) > 0):
if _isscalar(args[0]):
return 0.0
... | -1,138,811,285,084,507,900 | Evaluate the derivative of the function. The first input must exist and should be an array.
Returns an array of identical shape to args[0] (if it exists). This is an array of zeros. | HARK/interpolation.py | _der | cohenimhuji/HARK | python | def _der(self, *args):
'\n Evaluate the derivative of the function. The first input must exist and should be an array.\n Returns an array of identical shape to args[0] (if it exists). This is an array of zeros.\n '
if (len(args) > 0):
if _isscalar(args[0]):
return 0.0
... |
def __init__(self, x_list, y_list, intercept_limit=None, slope_limit=None, lower_extrap=False):
'\n The interpolation constructor to make a new linear spline interpolation.\n\n Parameters\n ----------\n x_list : np.array\n List of x values composing the grid.\n y_list :... | 52,940,877,021,593,310 | The interpolation constructor to make a new linear spline interpolation.
Parameters
----------
x_list : np.array
List of x values composing the grid.
y_list : np.array
List of y values, representing f(x) at the points in x_list.
intercept_limit : float
Intercept of limiting linear function.
slope_limit : f... | HARK/interpolation.py | __init__ | cohenimhuji/HARK | python | def __init__(self, x_list, y_list, intercept_limit=None, slope_limit=None, lower_extrap=False):
'\n The interpolation constructor to make a new linear spline interpolation.\n\n Parameters\n ----------\n x_list : np.array\n List of x values composing the grid.\n y_list :... |
def _evalOrDer(self, x, _eval, _Der):
'\n Returns the level and/or first derivative of the function at each value in\n x. Only called internally by HARKinterpolator1D.eval_and_der (etc).\n\n Parameters\n ----------\n x_list : scalar or np.array\n Set of points where we... | 6,101,460,031,458,400,000 | Returns the level and/or first derivative of the function at each value in
x. Only called internally by HARKinterpolator1D.eval_and_der (etc).
Parameters
----------
x_list : scalar or np.array
Set of points where we want to evlauate the interpolated function and/or its derivative..
_eval : boolean
Indicator f... | HARK/interpolation.py | _evalOrDer | cohenimhuji/HARK | python | def _evalOrDer(self, x, _eval, _Der):
'\n Returns the level and/or first derivative of the function at each value in\n x. Only called internally by HARKinterpolator1D.eval_and_der (etc).\n\n Parameters\n ----------\n x_list : scalar or np.array\n Set of points where we... |
def _evaluate(self, x, return_indices=False):
'\n Returns the level of the interpolated function at each value in x. Only\n called internally by HARKinterpolator1D.__call__ (etc).\n '
return self._evalOrDer(x, True, False)[0] | -5,831,651,768,712,529,000 | Returns the level of the interpolated function at each value in x. Only
called internally by HARKinterpolator1D.__call__ (etc). | HARK/interpolation.py | _evaluate | cohenimhuji/HARK | python | def _evaluate(self, x, return_indices=False):
'\n Returns the level of the interpolated function at each value in x. Only\n called internally by HARKinterpolator1D.__call__ (etc).\n '
return self._evalOrDer(x, True, False)[0] |
def _der(self, x):
'\n Returns the first derivative of the interpolated function at each value\n in x. Only called internally by HARKinterpolator1D.derivative (etc).\n '
return self._evalOrDer(x, False, True)[0] | -3,117,603,032,125,851,600 | Returns the first derivative of the interpolated function at each value
in x. Only called internally by HARKinterpolator1D.derivative (etc). | HARK/interpolation.py | _der | cohenimhuji/HARK | python | def _der(self, x):
'\n Returns the first derivative of the interpolated function at each value\n in x. Only called internally by HARKinterpolator1D.derivative (etc).\n '
return self._evalOrDer(x, False, True)[0] |
def _evalAndDer(self, x):
'\n Returns the level and first derivative of the function at each value in\n x. Only called internally by HARKinterpolator1D.eval_and_der (etc).\n '
(y, dydx) = self._evalOrDer(x, True, True)
return (y, dydx) | 8,009,502,929,567,022,000 | Returns the level and first derivative of the function at each value in
x. Only called internally by HARKinterpolator1D.eval_and_der (etc). | HARK/interpolation.py | _evalAndDer | cohenimhuji/HARK | python | def _evalAndDer(self, x):
'\n Returns the level and first derivative of the function at each value in\n x. Only called internally by HARKinterpolator1D.eval_and_der (etc).\n '
(y, dydx) = self._evalOrDer(x, True, True)
return (y, dydx) |
def __init__(self, x_list, y_list, dydx_list, intercept_limit=None, slope_limit=None, lower_extrap=False):
"\n The interpolation constructor to make a new cubic spline interpolation.\n\n Parameters\n ----------\n x_list : np.array\n List of x values composing the grid.\n ... | 909,126,979,905,643,600 | The interpolation constructor to make a new cubic spline interpolation.
Parameters
----------
x_list : np.array
List of x values composing the grid.
y_list : np.array
List of y values, representing f(x) at the points in x_list.
dydx_list : np.array
List of dydx values, representing f'(x) at the points in x... | HARK/interpolation.py | __init__ | cohenimhuji/HARK | python | def __init__(self, x_list, y_list, dydx_list, intercept_limit=None, slope_limit=None, lower_extrap=False):
"\n The interpolation constructor to make a new cubic spline interpolation.\n\n Parameters\n ----------\n x_list : np.array\n List of x values composing the grid.\n ... |
def _evaluate(self, x):
'\n Returns the level of the interpolated function at each value in x. Only\n called internally by HARKinterpolator1D.__call__ (etc).\n '
if _isscalar(x):
pos = np.searchsorted(self.x_list, x)
if (pos == 0):
y = (self.coeffs[(0, 0)] + (se... | -5,248,127,314,382,000,000 | Returns the level of the interpolated function at each value in x. Only
called internally by HARKinterpolator1D.__call__ (etc). | HARK/interpolation.py | _evaluate | cohenimhuji/HARK | python | def _evaluate(self, x):
'\n Returns the level of the interpolated function at each value in x. Only\n called internally by HARKinterpolator1D.__call__ (etc).\n '
if _isscalar(x):
pos = np.searchsorted(self.x_list, x)
if (pos == 0):
y = (self.coeffs[(0, 0)] + (se... |
def _der(self, x):
'\n Returns the first derivative of the interpolated function at each value\n in x. Only called internally by HARKinterpolator1D.derivative (etc).\n '
if _isscalar(x):
pos = np.searchsorted(self.x_list, x)
if (pos == 0):
dydx = self.coeffs[(0, ... | -1,783,155,871,987,838,500 | Returns the first derivative of the interpolated function at each value
in x. Only called internally by HARKinterpolator1D.derivative (etc). | HARK/interpolation.py | _der | cohenimhuji/HARK | python | def _der(self, x):
'\n Returns the first derivative of the interpolated function at each value\n in x. Only called internally by HARKinterpolator1D.derivative (etc).\n '
if _isscalar(x):
pos = np.searchsorted(self.x_list, x)
if (pos == 0):
dydx = self.coeffs[(0, ... |
def _evalAndDer(self, x):
'\n Returns the level and first derivative of the function at each value in\n x. Only called internally by HARKinterpolator1D.eval_and_der (etc).\n '
if _isscalar(x):
pos = np.searchsorted(self.x_list, x)
if (pos == 0):
y = (self.coeffs... | -2,541,531,060,344,856,000 | Returns the level and first derivative of the function at each value in
x. Only called internally by HARKinterpolator1D.eval_and_der (etc). | HARK/interpolation.py | _evalAndDer | cohenimhuji/HARK | python | def _evalAndDer(self, x):
'\n Returns the level and first derivative of the function at each value in\n x. Only called internally by HARKinterpolator1D.eval_and_der (etc).\n '
if _isscalar(x):
pos = np.searchsorted(self.x_list, x)
if (pos == 0):
y = (self.coeffs... |
def __init__(self, f_values, x_list, y_list, xSearchFunc=None, ySearchFunc=None):
'\n Constructor to make a new bilinear interpolation.\n\n Parameters\n ----------\n f_values : numpy.array\n An array of size (x_n,y_n) such that f_values[i,j] = f(x_list[i],y_list[j])\n x... | -8,735,612,400,203,041,000 | Constructor to make a new bilinear interpolation.
Parameters
----------
f_values : numpy.array
An array of size (x_n,y_n) such that f_values[i,j] = f(x_list[i],y_list[j])
x_list : numpy.array
An array of x values, with length designated x_n.
y_list : numpy.array
An array of y values, with length designated... | HARK/interpolation.py | __init__ | cohenimhuji/HARK | python | def __init__(self, f_values, x_list, y_list, xSearchFunc=None, ySearchFunc=None):
'\n Constructor to make a new bilinear interpolation.\n\n Parameters\n ----------\n f_values : numpy.array\n An array of size (x_n,y_n) such that f_values[i,j] = f(x_list[i],y_list[j])\n x... |
def _evaluate(self, x, y):
'\n Returns the level of the interpolated function at each value in x,y.\n Only called internally by HARKinterpolator2D.__call__ (etc).\n '
if _isscalar(x):
x_pos = max(min(self.xSearchFunc(self.x_list, x), (self.x_n - 1)), 1)
y_pos = max(min(self.... | 6,744,523,181,384,585,000 | Returns the level of the interpolated function at each value in x,y.
Only called internally by HARKinterpolator2D.__call__ (etc). | HARK/interpolation.py | _evaluate | cohenimhuji/HARK | python | def _evaluate(self, x, y):
'\n Returns the level of the interpolated function at each value in x,y.\n Only called internally by HARKinterpolator2D.__call__ (etc).\n '
if _isscalar(x):
x_pos = max(min(self.xSearchFunc(self.x_list, x), (self.x_n - 1)), 1)
y_pos = max(min(self.... |
def _derX(self, x, y):
'\n Returns the derivative with respect to x of the interpolated function\n at each value in x,y. Only called internally by HARKinterpolator2D.derivativeX.\n '
if _isscalar(x):
x_pos = max(min(self.xSearchFunc(self.x_list, x), (self.x_n - 1)), 1)
y_pos... | 3,078,626,608,488,745,000 | Returns the derivative with respect to x of the interpolated function
at each value in x,y. Only called internally by HARKinterpolator2D.derivativeX. | HARK/interpolation.py | _derX | cohenimhuji/HARK | python | def _derX(self, x, y):
'\n Returns the derivative with respect to x of the interpolated function\n at each value in x,y. Only called internally by HARKinterpolator2D.derivativeX.\n '
if _isscalar(x):
x_pos = max(min(self.xSearchFunc(self.x_list, x), (self.x_n - 1)), 1)
y_pos... |
def _derY(self, x, y):
'\n Returns the derivative with respect to y of the interpolated function\n at each value in x,y. Only called internally by HARKinterpolator2D.derivativeY.\n '
if _isscalar(x):
x_pos = max(min(self.xSearchFunc(self.x_list, x), (self.x_n - 1)), 1)
y_pos... | -4,398,777,141,352,737,300 | Returns the derivative with respect to y of the interpolated function
at each value in x,y. Only called internally by HARKinterpolator2D.derivativeY. | HARK/interpolation.py | _derY | cohenimhuji/HARK | python | def _derY(self, x, y):
'\n Returns the derivative with respect to y of the interpolated function\n at each value in x,y. Only called internally by HARKinterpolator2D.derivativeY.\n '
if _isscalar(x):
x_pos = max(min(self.xSearchFunc(self.x_list, x), (self.x_n - 1)), 1)
y_pos... |
def __init__(self, f_values, x_list, y_list, z_list, xSearchFunc=None, ySearchFunc=None, zSearchFunc=None):
'\n Constructor to make a new trilinear interpolation.\n\n Parameters\n ----------\n f_values : numpy.array\n An array of size (x_n,y_n,z_n) such that f_values[i,j,k] =\... | 7,669,639,221,495,992,000 | Constructor to make a new trilinear interpolation.
Parameters
----------
f_values : numpy.array
An array of size (x_n,y_n,z_n) such that f_values[i,j,k] =
f(x_list[i],y_list[j],z_list[k])
x_list : numpy.array
An array of x values, with length designated x_n.
y_list : numpy.array
An array of y values, w... | HARK/interpolation.py | __init__ | cohenimhuji/HARK | python | def __init__(self, f_values, x_list, y_list, z_list, xSearchFunc=None, ySearchFunc=None, zSearchFunc=None):
'\n Constructor to make a new trilinear interpolation.\n\n Parameters\n ----------\n f_values : numpy.array\n An array of size (x_n,y_n,z_n) such that f_values[i,j,k] =\... |
def _evaluate(self, x, y, z):
'\n Returns the level of the interpolated function at each value in x,y,z.\n Only called internally by HARKinterpolator3D.__call__ (etc).\n '
if _isscalar(x):
x_pos = max(min(self.xSearchFunc(self.x_list, x), (self.x_n - 1)), 1)
y_pos = max(min(... | -3,764,285,584,818,235,400 | Returns the level of the interpolated function at each value in x,y,z.
Only called internally by HARKinterpolator3D.__call__ (etc). | HARK/interpolation.py | _evaluate | cohenimhuji/HARK | python | def _evaluate(self, x, y, z):
'\n Returns the level of the interpolated function at each value in x,y,z.\n Only called internally by HARKinterpolator3D.__call__ (etc).\n '
if _isscalar(x):
x_pos = max(min(self.xSearchFunc(self.x_list, x), (self.x_n - 1)), 1)
y_pos = max(min(... |
def _derX(self, x, y, z):
'\n Returns the derivative with respect to x of the interpolated function\n at each value in x,y,z. Only called internally by HARKinterpolator3D.derivativeX.\n '
if _isscalar(x):
x_pos = max(min(self.xSearchFunc(self.x_list, x), (self.x_n - 1)), 1)
... | 5,696,914,352,870,816,000 | Returns the derivative with respect to x of the interpolated function
at each value in x,y,z. Only called internally by HARKinterpolator3D.derivativeX. | HARK/interpolation.py | _derX | cohenimhuji/HARK | python | def _derX(self, x, y, z):
'\n Returns the derivative with respect to x of the interpolated function\n at each value in x,y,z. Only called internally by HARKinterpolator3D.derivativeX.\n '
if _isscalar(x):
x_pos = max(min(self.xSearchFunc(self.x_list, x), (self.x_n - 1)), 1)
... |
def _derY(self, x, y, z):
'\n Returns the derivative with respect to y of the interpolated function\n at each value in x,y,z. Only called internally by HARKinterpolator3D.derivativeY.\n '
if _isscalar(x):
x_pos = max(min(self.xSearchFunc(self.x_list, x), (self.x_n - 1)), 1)
... | -5,693,452,147,213,393,000 | Returns the derivative with respect to y of the interpolated function
at each value in x,y,z. Only called internally by HARKinterpolator3D.derivativeY. | HARK/interpolation.py | _derY | cohenimhuji/HARK | python | def _derY(self, x, y, z):
'\n Returns the derivative with respect to y of the interpolated function\n at each value in x,y,z. Only called internally by HARKinterpolator3D.derivativeY.\n '
if _isscalar(x):
x_pos = max(min(self.xSearchFunc(self.x_list, x), (self.x_n - 1)), 1)
... |
def _derZ(self, x, y, z):
'\n Returns the derivative with respect to z of the interpolated function\n at each value in x,y,z. Only called internally by HARKinterpolator3D.derivativeZ.\n '
if _isscalar(x):
x_pos = max(min(self.xSearchFunc(self.x_list, x), (self.x_n - 1)), 1)
... | -3,054,681,140,601,009,000 | Returns the derivative with respect to z of the interpolated function
at each value in x,y,z. Only called internally by HARKinterpolator3D.derivativeZ. | HARK/interpolation.py | _derZ | cohenimhuji/HARK | python | def _derZ(self, x, y, z):
'\n Returns the derivative with respect to z of the interpolated function\n at each value in x,y,z. Only called internally by HARKinterpolator3D.derivativeZ.\n '
if _isscalar(x):
x_pos = max(min(self.xSearchFunc(self.x_list, x), (self.x_n - 1)), 1)
... |
def __init__(self, f_values, w_list, x_list, y_list, z_list, wSearchFunc=None, xSearchFunc=None, ySearchFunc=None, zSearchFunc=None):
'\n Constructor to make a new quadlinear interpolation.\n\n Parameters\n ----------\n f_values : numpy.array\n An array of size (w_n,x_n,y_n,z_... | 6,327,270,494,203,699,000 | Constructor to make a new quadlinear interpolation.
Parameters
----------
f_values : numpy.array
An array of size (w_n,x_n,y_n,z_n) such that f_values[i,j,k,l] =
f(w_list[i],x_list[j],y_list[k],z_list[l])
w_list : numpy.array
An array of x values, with length designated w_n.
x_list : numpy.array
An arr... | HARK/interpolation.py | __init__ | cohenimhuji/HARK | python | def __init__(self, f_values, w_list, x_list, y_list, z_list, wSearchFunc=None, xSearchFunc=None, ySearchFunc=None, zSearchFunc=None):
'\n Constructor to make a new quadlinear interpolation.\n\n Parameters\n ----------\n f_values : numpy.array\n An array of size (w_n,x_n,y_n,z_... |
def _evaluate(self, w, x, y, z):
'\n Returns the level of the interpolated function at each value in x,y,z.\n Only called internally by HARKinterpolator4D.__call__ (etc).\n '
if _isscalar(w):
w_pos = max(min(self.wSearchFunc(self.w_list, w), (self.w_n - 1)), 1)
x_pos = max(m... | 3,892,936,717,146,668,500 | Returns the level of the interpolated function at each value in x,y,z.
Only called internally by HARKinterpolator4D.__call__ (etc). | HARK/interpolation.py | _evaluate | cohenimhuji/HARK | python | def _evaluate(self, w, x, y, z):
'\n Returns the level of the interpolated function at each value in x,y,z.\n Only called internally by HARKinterpolator4D.__call__ (etc).\n '
if _isscalar(w):
w_pos = max(min(self.wSearchFunc(self.w_list, w), (self.w_n - 1)), 1)
x_pos = max(m... |
def _derW(self, w, x, y, z):
'\n Returns the derivative with respect to w of the interpolated function\n at each value in w,x,y,z. Only called internally by HARKinterpolator4D.derivativeW.\n '
if _isscalar(w):
w_pos = max(min(self.wSearchFunc(self.w_list, w), (self.w_n - 1)), 1)
... | -9,105,297,813,256,432,000 | Returns the derivative with respect to w of the interpolated function
at each value in w,x,y,z. Only called internally by HARKinterpolator4D.derivativeW. | HARK/interpolation.py | _derW | cohenimhuji/HARK | python | def _derW(self, w, x, y, z):
'\n Returns the derivative with respect to w of the interpolated function\n at each value in w,x,y,z. Only called internally by HARKinterpolator4D.derivativeW.\n '
if _isscalar(w):
w_pos = max(min(self.wSearchFunc(self.w_list, w), (self.w_n - 1)), 1)
... |
def _derX(self, w, x, y, z):
'\n Returns the derivative with respect to x of the interpolated function\n at each value in w,x,y,z. Only called internally by HARKinterpolator4D.derivativeX.\n '
if _isscalar(w):
w_pos = max(min(self.wSearchFunc(self.w_list, w), (self.w_n - 1)), 1)
... | -5,354,617,837,738,358,000 | Returns the derivative with respect to x of the interpolated function
at each value in w,x,y,z. Only called internally by HARKinterpolator4D.derivativeX. | HARK/interpolation.py | _derX | cohenimhuji/HARK | python | def _derX(self, w, x, y, z):
'\n Returns the derivative with respect to x of the interpolated function\n at each value in w,x,y,z. Only called internally by HARKinterpolator4D.derivativeX.\n '
if _isscalar(w):
w_pos = max(min(self.wSearchFunc(self.w_list, w), (self.w_n - 1)), 1)
... |
def _derY(self, w, x, y, z):
'\n Returns the derivative with respect to y of the interpolated function\n at each value in w,x,y,z. Only called internally by HARKinterpolator4D.derivativeY.\n '
if _isscalar(w):
w_pos = max(min(self.wSearchFunc(self.w_list, w), (self.w_n - 1)), 1)
... | 5,392,812,195,969,430,000 | Returns the derivative with respect to y of the interpolated function
at each value in w,x,y,z. Only called internally by HARKinterpolator4D.derivativeY. | HARK/interpolation.py | _derY | cohenimhuji/HARK | python | def _derY(self, w, x, y, z):
'\n Returns the derivative with respect to y of the interpolated function\n at each value in w,x,y,z. Only called internally by HARKinterpolator4D.derivativeY.\n '
if _isscalar(w):
w_pos = max(min(self.wSearchFunc(self.w_list, w), (self.w_n - 1)), 1)
... |
def _derZ(self, w, x, y, z):
'\n Returns the derivative with respect to z of the interpolated function\n at each value in w,x,y,z. Only called internally by HARKinterpolator4D.derivativeZ.\n '
if _isscalar(w):
w_pos = max(min(self.wSearchFunc(self.w_list, w), (self.w_n - 1)), 1)
... | 5,830,951,684,613,317,000 | Returns the derivative with respect to z of the interpolated function
at each value in w,x,y,z. Only called internally by HARKinterpolator4D.derivativeZ. | HARK/interpolation.py | _derZ | cohenimhuji/HARK | python | def _derZ(self, w, x, y, z):
'\n Returns the derivative with respect to z of the interpolated function\n at each value in w,x,y,z. Only called internally by HARKinterpolator4D.derivativeZ.\n '
if _isscalar(w):
w_pos = max(min(self.wSearchFunc(self.w_list, w), (self.w_n - 1)), 1)
... |
def __init__(self, *functions):
'\n Constructor to make a new lower envelope iterpolation.\n\n Parameters\n ----------\n *functions : function\n Any number of real functions; often instances of HARKinterpolator1D\n\n Returns\n -------\n new instance of Low... | 98,166,836,494,282,300 | Constructor to make a new lower envelope iterpolation.
Parameters
----------
*functions : function
Any number of real functions; often instances of HARKinterpolator1D
Returns
-------
new instance of LowerEnvelope | HARK/interpolation.py | __init__ | cohenimhuji/HARK | python | def __init__(self, *functions):
'\n Constructor to make a new lower envelope iterpolation.\n\n Parameters\n ----------\n *functions : function\n Any number of real functions; often instances of HARKinterpolator1D\n\n Returns\n -------\n new instance of Low... |
def _evaluate(self, x):
'\n Returns the level of the function at each value in x as the minimum among\n all of the functions. Only called internally by HARKinterpolator1D.__call__.\n '
if _isscalar(x):
y = np.nanmin([f(x) for f in self.functions])
else:
m = len(x)
... | 6,890,667,517,272,024,000 | Returns the level of the function at each value in x as the minimum among
all of the functions. Only called internally by HARKinterpolator1D.__call__. | HARK/interpolation.py | _evaluate | cohenimhuji/HARK | python | def _evaluate(self, x):
'\n Returns the level of the function at each value in x as the minimum among\n all of the functions. Only called internally by HARKinterpolator1D.__call__.\n '
if _isscalar(x):
y = np.nanmin([f(x) for f in self.functions])
else:
m = len(x)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.