repo stringlengths 7 55 | path stringlengths 4 127 | func_name stringlengths 1 88 | original_string stringlengths 75 19.8k | language stringclasses 1
value | code stringlengths 75 19.8k | code_tokens list | docstring stringlengths 3 17.3k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 87 242 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | tpictr | def tpictr(sample, lenout=_default_len_out, lenerr=_default_len_out):
"""
Given a sample time string, create a time format picture
suitable for use by the routine timout.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tpictr_c.html
:param sample: A sample time string.
:type sample: st... | python | def tpictr(sample, lenout=_default_len_out, lenerr=_default_len_out):
"""
Given a sample time string, create a time format picture
suitable for use by the routine timout.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tpictr_c.html
:param sample: A sample time string.
:type sample: st... | [
"def",
"tpictr",
"(",
"sample",
",",
"lenout",
"=",
"_default_len_out",
",",
"lenerr",
"=",
"_default_len_out",
")",
":",
"sample",
"=",
"stypes",
".",
"stringToCharP",
"(",
"sample",
")",
"pictur",
"=",
"stypes",
".",
"stringToCharP",
"(",
"lenout",
")",
... | Given a sample time string, create a time format picture
suitable for use by the routine timout.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tpictr_c.html
:param sample: A sample time string.
:type sample: str
:param lenout: The length for the output picture string.
:type lenout: i... | [
"Given",
"a",
"sample",
"time",
"string",
"create",
"a",
"time",
"format",
"picture",
"suitable",
"for",
"use",
"by",
"the",
"routine",
"timout",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13986-L14013 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | trcdep | def trcdep():
"""
Return the number of modules in the traceback representation.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/trcdep_c.html
:return: The number of modules in the traceback.
:rtype: int
"""
depth = ctypes.c_int()
libspice.trcdep_c(ctypes.byref(depth))
retur... | python | def trcdep():
"""
Return the number of modules in the traceback representation.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/trcdep_c.html
:return: The number of modules in the traceback.
:rtype: int
"""
depth = ctypes.c_int()
libspice.trcdep_c(ctypes.byref(depth))
retur... | [
"def",
"trcdep",
"(",
")",
":",
"depth",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"trcdep_c",
"(",
"ctypes",
".",
"byref",
"(",
"depth",
")",
")",
"return",
"depth",
".",
"value"
] | Return the number of modules in the traceback representation.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/trcdep_c.html
:return: The number of modules in the traceback.
:rtype: int | [
"Return",
"the",
"number",
"of",
"modules",
"in",
"the",
"traceback",
"representation",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14033-L14044 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | trcnam | def trcnam(index, namlen=_default_len_out):
"""
Return the name of the module having the specified position in
the trace representation. The first module to check in is at
index 0.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/trcnam_c.html
:param index: The position of the requested... | python | def trcnam(index, namlen=_default_len_out):
"""
Return the name of the module having the specified position in
the trace representation. The first module to check in is at
index 0.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/trcnam_c.html
:param index: The position of the requested... | [
"def",
"trcnam",
"(",
"index",
",",
"namlen",
"=",
"_default_len_out",
")",
":",
"index",
"=",
"ctypes",
".",
"c_int",
"(",
"index",
")",
"name",
"=",
"stypes",
".",
"stringToCharP",
"(",
"namlen",
")",
"namlen",
"=",
"ctypes",
".",
"c_int",
"(",
"naml... | Return the name of the module having the specified position in
the trace representation. The first module to check in is at
index 0.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/trcnam_c.html
:param index: The position of the requested module name.
:type index: int
:param namlen: Av... | [
"Return",
"the",
"name",
"of",
"the",
"module",
"having",
"the",
"specified",
"position",
"in",
"the",
"trace",
"representation",
".",
"The",
"first",
"module",
"to",
"check",
"in",
"is",
"at",
"index",
"0",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14048-L14067 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | twovec | def twovec(axdef, indexa, plndef, indexp):
"""
Find the transformation to the right-handed frame having a
given vector as a specified axis and having a second given
vector lying in a specified coordinate plane.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/twovec_c.html
:param axdef:... | python | def twovec(axdef, indexa, plndef, indexp):
"""
Find the transformation to the right-handed frame having a
given vector as a specified axis and having a second given
vector lying in a specified coordinate plane.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/twovec_c.html
:param axdef:... | [
"def",
"twovec",
"(",
"axdef",
",",
"indexa",
",",
"plndef",
",",
"indexp",
")",
":",
"axdef",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"axdef",
")",
"indexa",
"=",
"ctypes",
".",
"c_int",
"(",
"indexa",
")",
"plndef",
"=",
"stypes",
".",
"toDoubleVe... | Find the transformation to the right-handed frame having a
given vector as a specified axis and having a second given
vector lying in a specified coordinate plane.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/twovec_c.html
:param axdef: Vector defining a principal axis.
:type axdef: 3-E... | [
"Find",
"the",
"transformation",
"to",
"the",
"right",
"-",
"handed",
"frame",
"having",
"a",
"given",
"vector",
"as",
"a",
"specified",
"axis",
"and",
"having",
"a",
"second",
"given",
"vector",
"lying",
"in",
"a",
"specified",
"coordinate",
"plane",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14112-L14137 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | txtopn | def txtopn(fname):
"""
Internal undocumented command for opening a new text file for
subsequent write access.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ftncls_c.html#Files
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ftncls_c.html#Examples
:param fname: name of the n... | python | def txtopn(fname):
"""
Internal undocumented command for opening a new text file for
subsequent write access.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ftncls_c.html#Files
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ftncls_c.html#Examples
:param fname: name of the n... | [
"def",
"txtopn",
"(",
"fname",
")",
":",
"fnameP",
"=",
"stypes",
".",
"stringToCharP",
"(",
"fname",
")",
"unit_out",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"fname_len",
"=",
"ctypes",
".",
"c_int",
"(",
"len",
"(",
"fname",
")",
")",
"libspice",
".... | Internal undocumented command for opening a new text file for
subsequent write access.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ftncls_c.html#Files
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ftncls_c.html#Examples
:param fname: name of the new text file to be opened.
... | [
"Internal",
"undocumented",
"command",
"for",
"opening",
"a",
"new",
"text",
"file",
"for",
"subsequent",
"write",
"access",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14141-L14158 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | ucase | def ucase(inchar, lenout=None):
"""
Convert the characters in a string to uppercase.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ucase_c.html
:param inchar: Input string.
:type inchar: str
:param lenout: Optional Maximum length of output string.
:type lenout: int
:return: O... | python | def ucase(inchar, lenout=None):
"""
Convert the characters in a string to uppercase.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ucase_c.html
:param inchar: Input string.
:type inchar: str
:param lenout: Optional Maximum length of output string.
:type lenout: int
:return: O... | [
"def",
"ucase",
"(",
"inchar",
",",
"lenout",
"=",
"None",
")",
":",
"if",
"lenout",
"is",
"None",
":",
"lenout",
"=",
"len",
"(",
"inchar",
")",
"+",
"1",
"inchar",
"=",
"stypes",
".",
"stringToCharP",
"(",
"inchar",
")",
"outchar",
"=",
"stypes",
... | Convert the characters in a string to uppercase.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ucase_c.html
:param inchar: Input string.
:type inchar: str
:param lenout: Optional Maximum length of output string.
:type lenout: int
:return: Output string, all uppercase.
:rtype: str | [
"Convert",
"the",
"characters",
"in",
"a",
"string",
"to",
"uppercase",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14178-L14197 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | ucrss | def ucrss(v1, v2):
"""
Compute the normalized cross product of two 3-vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ucrss_c.html
:param v1: Left vector for cross product.
:type v1: 3-Element Array of floats
:param v2: Right vector for cross product.
:type v2: 3-Element Ar... | python | def ucrss(v1, v2):
"""
Compute the normalized cross product of two 3-vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ucrss_c.html
:param v1: Left vector for cross product.
:type v1: 3-Element Array of floats
:param v2: Right vector for cross product.
:type v2: 3-Element Ar... | [
"def",
"ucrss",
"(",
"v1",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
... | Compute the normalized cross product of two 3-vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ucrss_c.html
:param v1: Left vector for cross product.
:type v1: 3-Element Array of floats
:param v2: Right vector for cross product.
:type v2: 3-Element Array of floats
:return: Norm... | [
"Compute",
"the",
"normalized",
"cross",
"product",
"of",
"two",
"3",
"-",
"vectors",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14201-L14218 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | uddc | def uddc(udfunc, x, dx):
"""
SPICE private routine intended solely for the support of SPICE
routines. Users should not call this routine directly due to the
volatile nature of this routine.
This routine calculates the derivative of 'udfunc' with respect
to time for 'et', then determines if the ... | python | def uddc(udfunc, x, dx):
"""
SPICE private routine intended solely for the support of SPICE
routines. Users should not call this routine directly due to the
volatile nature of this routine.
This routine calculates the derivative of 'udfunc' with respect
to time for 'et', then determines if the ... | [
"def",
"uddc",
"(",
"udfunc",
",",
"x",
",",
"dx",
")",
":",
"x",
"=",
"ctypes",
".",
"c_double",
"(",
"x",
")",
"dx",
"=",
"ctypes",
".",
"c_double",
"(",
"dx",
")",
"isdescr",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"uddc_c",
... | SPICE private routine intended solely for the support of SPICE
routines. Users should not call this routine directly due to the
volatile nature of this routine.
This routine calculates the derivative of 'udfunc' with respect
to time for 'et', then determines if the derivative has a
negative value.
... | [
"SPICE",
"private",
"routine",
"intended",
"solely",
"for",
"the",
"support",
"of",
"SPICE",
"routines",
".",
"Users",
"should",
"not",
"call",
"this",
"routine",
"directly",
"due",
"to",
"the",
"volatile",
"nature",
"of",
"this",
"routine",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14221-L14257 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | uddf | def uddf(udfunc, x, dx):
"""
Routine to calculate the first derivative of a caller-specified
function using a three-point estimation.
Use the @spiceypy.utils.callbacks.SpiceUDFUNS dectorator to wrap
a given python function that takes one parameter (float) and
returns a float. For example::
... | python | def uddf(udfunc, x, dx):
"""
Routine to calculate the first derivative of a caller-specified
function using a three-point estimation.
Use the @spiceypy.utils.callbacks.SpiceUDFUNS dectorator to wrap
a given python function that takes one parameter (float) and
returns a float. For example::
... | [
"def",
"uddf",
"(",
"udfunc",
",",
"x",
",",
"dx",
")",
":",
"x",
"=",
"ctypes",
".",
"c_double",
"(",
"x",
")",
"dx",
"=",
"ctypes",
".",
"c_double",
"(",
"dx",
")",
"deriv",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"uddf_c",
... | Routine to calculate the first derivative of a caller-specified
function using a three-point estimation.
Use the @spiceypy.utils.callbacks.SpiceUDFUNS dectorator to wrap
a given python function that takes one parameter (float) and
returns a float. For example::
@spiceypy.utils.callbacks.SpiceU... | [
"Routine",
"to",
"calculate",
"the",
"first",
"derivative",
"of",
"a",
"caller",
"-",
"specified",
"function",
"using",
"a",
"three",
"-",
"point",
"estimation",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14261-L14292 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | udf | def udf(x):
"""
No-op routine for with an argument signature matching udfuns.
Allways returns 0.0 .
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/udf_c.html
:param x: Double precision value, unused.
:type x: float
:return: Double precision value, unused.
:rtype: float
""... | python | def udf(x):
"""
No-op routine for with an argument signature matching udfuns.
Allways returns 0.0 .
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/udf_c.html
:param x: Double precision value, unused.
:type x: float
:return: Double precision value, unused.
:rtype: float
""... | [
"def",
"udf",
"(",
"x",
")",
":",
"x",
"=",
"ctypes",
".",
"c_double",
"(",
"x",
")",
"value",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"udf_c",
"(",
"x",
",",
"ctypes",
".",
"byref",
"(",
"value",
")",
")",
"return",
"value",
... | No-op routine for with an argument signature matching udfuns.
Allways returns 0.0 .
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/udf_c.html
:param x: Double precision value, unused.
:type x: float
:return: Double precision value, unused.
:rtype: float | [
"No",
"-",
"op",
"routine",
"for",
"with",
"an",
"argument",
"signature",
"matching",
"udfuns",
".",
"Allways",
"returns",
"0",
".",
"0",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14295-L14310 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | unitim | def unitim(epoch, insys, outsys):
"""
Transform time from one uniform scale to another. The uniform
time scales are TAI, TDT, TDB, ET, JED, JDTDB, JDTDT.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unitim_c.html
:param epoch: An epoch to be converted.
:type epoch: float
:param... | python | def unitim(epoch, insys, outsys):
"""
Transform time from one uniform scale to another. The uniform
time scales are TAI, TDT, TDB, ET, JED, JDTDB, JDTDT.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unitim_c.html
:param epoch: An epoch to be converted.
:type epoch: float
:param... | [
"def",
"unitim",
"(",
"epoch",
",",
"insys",
",",
"outsys",
")",
":",
"epoch",
"=",
"ctypes",
".",
"c_double",
"(",
"epoch",
")",
"insys",
"=",
"stypes",
".",
"stringToCharP",
"(",
"insys",
")",
"outsys",
"=",
"stypes",
".",
"stringToCharP",
"(",
"outs... | Transform time from one uniform scale to another. The uniform
time scales are TAI, TDT, TDB, ET, JED, JDTDB, JDTDT.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unitim_c.html
:param epoch: An epoch to be converted.
:type epoch: float
:param insys: The time scale associated with the inp... | [
"Transform",
"time",
"from",
"one",
"uniform",
"scale",
"to",
"another",
".",
"The",
"uniform",
"time",
"scales",
"are",
"TAI",
"TDT",
"TDB",
"ET",
"JED",
"JDTDB",
"JDTDT",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14345-L14366 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | unload | def unload(filename):
"""
Unload a SPICE kernel.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unload_c.html
:param filename: The name of a kernel to unload.
:type filename: str
"""
if isinstance(filename, list):
for f in filename:
libspice.unload_c(stypes.str... | python | def unload(filename):
"""
Unload a SPICE kernel.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unload_c.html
:param filename: The name of a kernel to unload.
:type filename: str
"""
if isinstance(filename, list):
for f in filename:
libspice.unload_c(stypes.str... | [
"def",
"unload",
"(",
"filename",
")",
":",
"if",
"isinstance",
"(",
"filename",
",",
"list",
")",
":",
"for",
"f",
"in",
"filename",
":",
"libspice",
".",
"unload_c",
"(",
"stypes",
".",
"stringToCharP",
"(",
"f",
")",
")",
"return",
"filename",
"=",
... | Unload a SPICE kernel.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unload_c.html
:param filename: The name of a kernel to unload.
:type filename: str | [
"Unload",
"a",
"SPICE",
"kernel",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14370-L14384 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | unorm | def unorm(v1):
"""
Normalize a double precision 3-vector and return its magnitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unorm_c.html
:param v1: Vector to be normalized.
:type v1: 3-Element Array of floats
:return: Unit vector of v1, Magnitude of v1.
:rtype: tuple
""... | python | def unorm(v1):
"""
Normalize a double precision 3-vector and return its magnitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unorm_c.html
:param v1: Vector to be normalized.
:type v1: 3-Element Array of floats
:return: Unit vector of v1, Magnitude of v1.
:rtype: tuple
""... | [
"def",
"unorm",
"(",
"v1",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"vmag",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"unorm_c",
"(",
"v1",
... | Normalize a double precision 3-vector and return its magnitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unorm_c.html
:param v1: Vector to be normalized.
:type v1: 3-Element Array of floats
:return: Unit vector of v1, Magnitude of v1.
:rtype: tuple | [
"Normalize",
"a",
"double",
"precision",
"3",
"-",
"vector",
"and",
"return",
"its",
"magnitude",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14388-L14403 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | unormg | def unormg(v1, ndim):
"""
Normalize a double precision vector of arbitrary dimension and
return its magnitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unormg_c.html
:param v1: Vector to be normalized.
:type v1: Array of floats
:param ndim: This is the dimension of v1 and v... | python | def unormg(v1, ndim):
"""
Normalize a double precision vector of arbitrary dimension and
return its magnitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unormg_c.html
:param v1: Vector to be normalized.
:type v1: Array of floats
:param ndim: This is the dimension of v1 and v... | [
"def",
"unormg",
"(",
"v1",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"ndim",
")",
"vmag",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"ndim",
"=",
"ctypes",... | Normalize a double precision vector of arbitrary dimension and
return its magnitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unormg_c.html
:param v1: Vector to be normalized.
:type v1: Array of floats
:param ndim: This is the dimension of v1 and vout.
:type ndim: int
:ret... | [
"Normalize",
"a",
"double",
"precision",
"vector",
"of",
"arbitrary",
"dimension",
"and",
"return",
"its",
"magnitude",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14407-L14426 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | utc2et | def utc2et(utcstr):
"""
Convert an input time from Calendar or Julian Date format, UTC,
to ephemeris seconds past J2000.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/utc2et_c.html
:param utcstr: Input time string, UTC.
:type utcstr: str
:return: Output epoch, ephemeris seconds ... | python | def utc2et(utcstr):
"""
Convert an input time from Calendar or Julian Date format, UTC,
to ephemeris seconds past J2000.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/utc2et_c.html
:param utcstr: Input time string, UTC.
:type utcstr: str
:return: Output epoch, ephemeris seconds ... | [
"def",
"utc2et",
"(",
"utcstr",
")",
":",
"utcstr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"utcstr",
")",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"utc2et_c",
"(",
"utcstr",
",",
"ctypes",
".",
"byref",
"(",
"et",
")",
")",... | Convert an input time from Calendar or Julian Date format, UTC,
to ephemeris seconds past J2000.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/utc2et_c.html
:param utcstr: Input time string, UTC.
:type utcstr: str
:return: Output epoch, ephemeris seconds past J2000.
:rtype: float | [
"Convert",
"an",
"input",
"time",
"from",
"Calendar",
"or",
"Julian",
"Date",
"format",
"UTC",
"to",
"ephemeris",
"seconds",
"past",
"J2000",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14430-L14445 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | valid | def valid(insize, n, inset):
"""
Create a valid CSPICE set from a CSPICE Cell of any data type.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/valid_c.html
:param insize: Size (maximum cardinality) of the set.
:type insize: int
:param n: Initial no. of (possibly non-distinct) element... | python | def valid(insize, n, inset):
"""
Create a valid CSPICE set from a CSPICE Cell of any data type.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/valid_c.html
:param insize: Size (maximum cardinality) of the set.
:type insize: int
:param n: Initial no. of (possibly non-distinct) element... | [
"def",
"valid",
"(",
"insize",
",",
"n",
",",
"inset",
")",
":",
"assert",
"isinstance",
"(",
"inset",
",",
"stypes",
".",
"SpiceCell",
")",
"insize",
"=",
"ctypes",
".",
"c_int",
"(",
"insize",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"n",
")",... | Create a valid CSPICE set from a CSPICE Cell of any data type.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/valid_c.html
:param insize: Size (maximum cardinality) of the set.
:type insize: int
:param n: Initial no. of (possibly non-distinct) elements.
:type n: int
:param inset: Se... | [
"Create",
"a",
"valid",
"CSPICE",
"set",
"from",
"a",
"CSPICE",
"Cell",
"of",
"any",
"data",
"type",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14494-L14512 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vcrss | def vcrss(v1, v2):
"""
Compute the cross product of two 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vcrss_c.html
:param v1: Left hand vector for cross product.
:type v1: 3-Element Array of floats
:param v2: Right hand vector for cross product.
:type v2:... | python | def vcrss(v1, v2):
"""
Compute the cross product of two 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vcrss_c.html
:param v1: Left hand vector for cross product.
:type v1: 3-Element Array of floats
:param v2: Right hand vector for cross product.
:type v2:... | [
"def",
"vcrss",
"(",
"v1",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
... | Compute the cross product of two 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vcrss_c.html
:param v1: Left hand vector for cross product.
:type v1: 3-Element Array of floats
:param v2: Right hand vector for cross product.
:type v2: 3-Element Array of floats
... | [
"Compute",
"the",
"cross",
"product",
"of",
"two",
"3",
"-",
"dimensional",
"vectors",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14516-L14533 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vdist | def vdist(v1, v2):
"""
Return the distance between two three-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdist_c.html
:param v1: First vector in the dot product.
:type v1: 3-Element Array of floats
:param v2: Second vector in the dot product.
:type v2: 3-... | python | def vdist(v1, v2):
"""
Return the distance between two three-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdist_c.html
:param v1: First vector in the dot product.
:type v1: 3-Element Array of floats
:param v2: Second vector in the dot product.
:type v2: 3-... | [
"def",
"vdist",
"(",
"v1",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"return",
"libspice",
".",
"vdist_c",
"(",
"v1",
",",
"v2",
")"
] | Return the distance between two three-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdist_c.html
:param v1: First vector in the dot product.
:type v1: 3-Element Array of floats
:param v2: Second vector in the dot product.
:type v2: 3-Element Array of floats
:re... | [
"Return",
"the",
"distance",
"between",
"two",
"three",
"-",
"dimensional",
"vectors",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14537-L14552 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vdistg | def vdistg(v1, v2, ndim):
"""
Return the distance between two vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdistg_c.html
:param v1: ndim-dimensional double precision vector.
:type v1: list[ndim]
:param v2: ndim-dimensional double precision vector.
... | python | def vdistg(v1, v2, ndim):
"""
Return the distance between two vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdistg_c.html
:param v1: ndim-dimensional double precision vector.
:type v1: list[ndim]
:param v2: ndim-dimensional double precision vector.
... | [
"def",
"vdistg",
"(",
"v1",
",",
"v2",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"return",
... | Return the distance between two vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdistg_c.html
:param v1: ndim-dimensional double precision vector.
:type v1: list[ndim]
:param v2: ndim-dimensional double precision vector.
:type v2: list[ndim]
:param ndi... | [
"Return",
"the",
"distance",
"between",
"two",
"vectors",
"of",
"arbitrary",
"dimension",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14556-L14574 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vdot | def vdot(v1, v2):
"""
Compute the dot product of two double precision, 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdot_c.html
:param v1: First vector in the dot product.
:type v1: 3-Element Array of floats
:param v2: Second vector in the dot product.
:... | python | def vdot(v1, v2):
"""
Compute the dot product of two double precision, 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdot_c.html
:param v1: First vector in the dot product.
:type v1: 3-Element Array of floats
:param v2: Second vector in the dot product.
:... | [
"def",
"vdot",
"(",
"v1",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"return",
"libspice",
".",
"vdot_c",
"(",
"v1",
",",
"v2",
")"
] | Compute the dot product of two double precision, 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdot_c.html
:param v1: First vector in the dot product.
:type v1: 3-Element Array of floats
:param v2: Second vector in the dot product.
:type v2: 3-Element Array of fl... | [
"Compute",
"the",
"dot",
"product",
"of",
"two",
"double",
"precision",
"3",
"-",
"dimensional",
"vectors",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14578-L14593 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vdotg | def vdotg(v1, v2, ndim):
"""
Compute the dot product of two double precision vectors of
arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdotg_c.html
:param v1: First vector in the dot product.
:type v1: list[ndim]
:param v2: Second vector in the dot product.
... | python | def vdotg(v1, v2, ndim):
"""
Compute the dot product of two double precision vectors of
arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdotg_c.html
:param v1: First vector in the dot product.
:type v1: list[ndim]
:param v2: Second vector in the dot product.
... | [
"def",
"vdotg",
"(",
"v1",
",",
"v2",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"return",
... | Compute the dot product of two double precision vectors of
arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdotg_c.html
:param v1: First vector in the dot product.
:type v1: list[ndim]
:param v2: Second vector in the dot product.
:type v2: list[ndim]
:param n... | [
"Compute",
"the",
"dot",
"product",
"of",
"two",
"double",
"precision",
"vectors",
"of",
"arbitrary",
"dimension",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14597-L14616 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vequ | def vequ(v1):
"""
Make one double precision 3-dimensional vector equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vequ_c.html
:param v1: 3-dimensional double precision vector.
:type v1: 3-Element Array of floats
:return: 3-dimensional double precision vector set equal... | python | def vequ(v1):
"""
Make one double precision 3-dimensional vector equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vequ_c.html
:param v1: 3-dimensional double precision vector.
:type v1: 3-Element Array of floats
:return: 3-dimensional double precision vector set equal... | [
"def",
"vequ",
"(",
"v1",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vequ_c",
"(",
"v1",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorT... | Make one double precision 3-dimensional vector equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vequ_c.html
:param v1: 3-dimensional double precision vector.
:type v1: 3-Element Array of floats
:return: 3-dimensional double precision vector set equal to vin.
:rtype: 3-Ele... | [
"Make",
"one",
"double",
"precision",
"3",
"-",
"dimensional",
"vector",
"equal",
"to",
"another",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14620-L14634 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vequg | def vequg(v1, ndim):
"""
Make one double precision vector of arbitrary dimension equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vequg_c.html
:param v1: ndim-dimensional double precision vector.
:type v1: list[ndim]
:param ndim: Dimension of vin (and also vout).
... | python | def vequg(v1, ndim):
"""
Make one double precision vector of arbitrary dimension equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vequg_c.html
:param v1: ndim-dimensional double precision vector.
:type v1: list[ndim]
:param ndim: Dimension of vin (and also vout).
... | [
"def",
"vequg",
"(",
"v1",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"ndim",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"libspice",
".",
... | Make one double precision vector of arbitrary dimension equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vequg_c.html
:param v1: ndim-dimensional double precision vector.
:type v1: list[ndim]
:param ndim: Dimension of vin (and also vout).
:type ndim: int
:return: ndi... | [
"Make",
"one",
"double",
"precision",
"vector",
"of",
"arbitrary",
"dimension",
"equal",
"to",
"another",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14638-L14655 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vhat | def vhat(v1):
"""
Find the unit vector along a double precision 3-dimensional vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vhat_c.html
:param v1: Vector to be unitized.
:type v1: 3-Element Array of floats
:return: Unit vector v / abs(v).
:rtype: 3-Element Array of float... | python | def vhat(v1):
"""
Find the unit vector along a double precision 3-dimensional vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vhat_c.html
:param v1: Vector to be unitized.
:type v1: 3-Element Array of floats
:return: Unit vector v / abs(v).
:rtype: 3-Element Array of float... | [
"def",
"vhat",
"(",
"v1",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vhat_c",
"(",
"v1",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorT... | Find the unit vector along a double precision 3-dimensional vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vhat_c.html
:param v1: Vector to be unitized.
:type v1: 3-Element Array of floats
:return: Unit vector v / abs(v).
:rtype: 3-Element Array of floats | [
"Find",
"the",
"unit",
"vector",
"along",
"a",
"double",
"precision",
"3",
"-",
"dimensional",
"vector",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14659-L14673 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vhatg | def vhatg(v1, ndim):
"""
Find the unit vector along a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vhatg_c.html
:param v1: Vector to be normalized.
:type v1: list[ndim]
:param ndim: Dimension of v1 (and also vout).
:type ndim: in... | python | def vhatg(v1, ndim):
"""
Find the unit vector along a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vhatg_c.html
:param v1: Vector to be normalized.
:type v1: list[ndim]
:param ndim: Dimension of v1 (and also vout).
:type ndim: in... | [
"def",
"vhatg",
"(",
"v1",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"ndim",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"libspice",
".",
... | Find the unit vector along a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vhatg_c.html
:param v1: Vector to be normalized.
:type v1: list[ndim]
:param ndim: Dimension of v1 (and also vout).
:type ndim: int
:return: Unit vector v / ab... | [
"Find",
"the",
"unit",
"vector",
"along",
"a",
"double",
"precision",
"vector",
"of",
"arbitrary",
"dimension",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14677-L14694 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vlcom | def vlcom(a, v1, b, v2):
"""
Compute a vector linear combination of two double precision,
3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vlcom_c.html
:param a: Coefficient of v1
:type a: float
:param v1: Vector in 3-space
:type v1: 3-Element Array of f... | python | def vlcom(a, v1, b, v2):
"""
Compute a vector linear combination of two double precision,
3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vlcom_c.html
:param a: Coefficient of v1
:type a: float
:param v1: Vector in 3-space
:type v1: 3-Element Array of f... | [
"def",
"vlcom",
"(",
"a",
",",
"v1",
",",
"b",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"sumv",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
... | Compute a vector linear combination of two double precision,
3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vlcom_c.html
:param a: Coefficient of v1
:type a: float
:param v1: Vector in 3-space
:type v1: 3-Element Array of floats
:param b: Coefficient of v2... | [
"Compute",
"a",
"vector",
"linear",
"combination",
"of",
"two",
"double",
"precision",
"3",
"-",
"dimensional",
"vectors",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14698-L14722 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vlcomg | def vlcomg(n, a, v1, b, v2):
"""
Compute a vector linear combination of two double precision
vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vlcomg_c.html
:param n: Dimension of vector space
:type n: int
:param a: Coefficient of v1
:type a: flo... | python | def vlcomg(n, a, v1, b, v2):
"""
Compute a vector linear combination of two double precision
vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vlcomg_c.html
:param n: Dimension of vector space
:type n: int
:param a: Coefficient of v1
:type a: flo... | [
"def",
"vlcomg",
"(",
"n",
",",
"a",
",",
"v1",
",",
"b",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"sumv",
"=",
"stypes",
".",
"emptyDoubleVector",
... | Compute a vector linear combination of two double precision
vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vlcomg_c.html
:param n: Dimension of vector space
:type n: int
:param a: Coefficient of v1
:type a: float
:param v1: Vector in n-space
... | [
"Compute",
"a",
"vector",
"linear",
"combination",
"of",
"two",
"double",
"precision",
"vectors",
"of",
"arbitrary",
"dimension",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14760-L14787 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vminug | def vminug(vin, ndim):
"""
Negate a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vminug_c.html
:param vin: ndim-dimensional double precision vector to be negated.
:type vin: Array of floats
:param ndim: Dimension of vin.
:type nd... | python | def vminug(vin, ndim):
"""
Negate a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vminug_c.html
:param vin: ndim-dimensional double precision vector to be negated.
:type vin: Array of floats
:param ndim: Dimension of vin.
:type nd... | [
"def",
"vminug",
"(",
"vin",
",",
"ndim",
")",
":",
"vin",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"vin",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"ndim",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"libspice",
".... | Negate a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vminug_c.html
:param vin: ndim-dimensional double precision vector to be negated.
:type vin: Array of floats
:param ndim: Dimension of vin.
:type ndim: int
:return: ndim-dimension... | [
"Negate",
"a",
"double",
"precision",
"vector",
"of",
"arbitrary",
"dimension",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14791-L14808 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vminus | def vminus(vin):
"""
Negate a double precision 3-dimensional vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vminus_c.html
:param vin: Vector to be negated.
:type vin: 3-Element Array of floats
:return: Negated vector -v1.
:rtype: 3-Element Array of floats
"""
vin ... | python | def vminus(vin):
"""
Negate a double precision 3-dimensional vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vminus_c.html
:param vin: Vector to be negated.
:type vin: 3-Element Array of floats
:return: Negated vector -v1.
:rtype: 3-Element Array of floats
"""
vin ... | [
"def",
"vminus",
"(",
"vin",
")",
":",
"vin",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"vin",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vminus_c",
"(",
"vin",
",",
"vout",
")",
"return",
"stypes",
".",
"... | Negate a double precision 3-dimensional vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vminus_c.html
:param vin: Vector to be negated.
:type vin: 3-Element Array of floats
:return: Negated vector -v1.
:rtype: 3-Element Array of floats | [
"Negate",
"a",
"double",
"precision",
"3",
"-",
"dimensional",
"vector",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14812-L14826 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vnormg | def vnormg(v, ndim):
"""
Compute the magnitude of a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vnormg_c.html
:param v: Vector whose magnitude is to be found.
:type v: Array of floats
:param ndim: Dimension of v
:type ndim: int
... | python | def vnormg(v, ndim):
"""
Compute the magnitude of a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vnormg_c.html
:param v: Vector whose magnitude is to be found.
:type v: Array of floats
:param ndim: Dimension of v
:type ndim: int
... | [
"def",
"vnormg",
"(",
"v",
",",
"ndim",
")",
":",
"v",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"return",
"libspice",
".",
"vnormg_c",
"(",
"v",
",",
"ndim",
")"
] | Compute the magnitude of a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vnormg_c.html
:param v: Vector whose magnitude is to be found.
:type v: Array of floats
:param ndim: Dimension of v
:type ndim: int
:return: magnitude of v calcu... | [
"Compute",
"the",
"magnitude",
"of",
"a",
"double",
"precision",
"vector",
"of",
"arbitrary",
"dimension",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14846-L14861 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vpack | def vpack(x, y, z):
"""
Pack three scalar components into a vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vpack_c.html
:param x: first scalar component
:type x: float
:param y: second scalar component
:type y: float
:param z: third scalar component
:type z: flo... | python | def vpack(x, y, z):
"""
Pack three scalar components into a vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vpack_c.html
:param x: first scalar component
:type x: float
:param y: second scalar component
:type y: float
:param z: third scalar component
:type z: flo... | [
"def",
"vpack",
"(",
"x",
",",
"y",
",",
"z",
")",
":",
"x",
"=",
"ctypes",
".",
"c_double",
"(",
"x",
")",
"y",
"=",
"ctypes",
".",
"c_double",
"(",
"y",
")",
"z",
"=",
"ctypes",
".",
"c_double",
"(",
"z",
")",
"vout",
"=",
"stypes",
".",
... | Pack three scalar components into a vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vpack_c.html
:param x: first scalar component
:type x: float
:param y: second scalar component
:type y: float
:param z: third scalar component
:type z: float
:return: Equivalent 3-vec... | [
"Pack",
"three",
"scalar",
"components",
"into",
"a",
"vector",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14865-L14885 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vperp | def vperp(a, b):
"""
Find the component of a vector that is perpendicular to a second
vector. All vectors are 3-dimensional.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vperp_c.html
:param a: The vector whose orthogonal component is sought.
:type a: 3-Element Array of floats
:... | python | def vperp(a, b):
"""
Find the component of a vector that is perpendicular to a second
vector. All vectors are 3-dimensional.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vperp_c.html
:param a: The vector whose orthogonal component is sought.
:type a: 3-Element Array of floats
:... | [
"def",
"vperp",
"(",
"a",
",",
"b",
")",
":",
"a",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"a",
")",
"b",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"b",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vper... | Find the component of a vector that is perpendicular to a second
vector. All vectors are 3-dimensional.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vperp_c.html
:param a: The vector whose orthogonal component is sought.
:type a: 3-Element Array of floats
:param b: The vector used as t... | [
"Find",
"the",
"component",
"of",
"a",
"vector",
"that",
"is",
"perpendicular",
"to",
"a",
"second",
"vector",
".",
"All",
"vectors",
"are",
"3",
"-",
"dimensional",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14889-L14907 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vprjp | def vprjp(vin, plane):
"""
Project a vector onto a specified plane, orthogonally.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vprjp_c.html
:param vin: The projected vector.
:type vin: 3-Element Array of floats
:param plane: Plane containing vin.
:type plane: spiceypy.utils.su... | python | def vprjp(vin, plane):
"""
Project a vector onto a specified plane, orthogonally.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vprjp_c.html
:param vin: The projected vector.
:type vin: 3-Element Array of floats
:param plane: Plane containing vin.
:type plane: spiceypy.utils.su... | [
"def",
"vprjp",
"(",
"vin",
",",
"plane",
")",
":",
"vin",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"vin",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vprjp_c",
"(",
"vin",
",",
"ctypes",
".",
"byref",
"("... | Project a vector onto a specified plane, orthogonally.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vprjp_c.html
:param vin: The projected vector.
:type vin: 3-Element Array of floats
:param plane: Plane containing vin.
:type plane: spiceypy.utils.support_types.Plane
:return: Vect... | [
"Project",
"a",
"vector",
"onto",
"a",
"specified",
"plane",
"orthogonally",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14911-L14927 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vprjpi | def vprjpi(vin, projpl, invpl):
"""
Find the vector in a specified plane that maps to a specified
vector in another plane under orthogonal projection.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vprjpi_c.html
:param vin: The projected vector.
:type vin: 3-Element Array of floats
... | python | def vprjpi(vin, projpl, invpl):
"""
Find the vector in a specified plane that maps to a specified
vector in another plane under orthogonal projection.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vprjpi_c.html
:param vin: The projected vector.
:type vin: 3-Element Array of floats
... | [
"def",
"vprjpi",
"(",
"vin",
",",
"projpl",
",",
"invpl",
")",
":",
"vin",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"vin",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"found",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspic... | Find the vector in a specified plane that maps to a specified
vector in another plane under orthogonal projection.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vprjpi_c.html
:param vin: The projected vector.
:type vin: 3-Element Array of floats
:param projpl: Plane containing vin.
... | [
"Find",
"the",
"vector",
"in",
"a",
"specified",
"plane",
"that",
"maps",
"to",
"a",
"specified",
"vector",
"in",
"another",
"plane",
"under",
"orthogonal",
"projection",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14932-L14953 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vproj | def vproj(a, b):
"""
Find the projection of one vector onto another vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vproj_c.html
:param a: The vector to be projected.
:type a: 3-Element Array of floats
:param b: The vector onto which a is to be projected.
:type b: 3-Eleme... | python | def vproj(a, b):
"""
Find the projection of one vector onto another vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vproj_c.html
:param a: The vector to be projected.
:type a: 3-Element Array of floats
:param b: The vector onto which a is to be projected.
:type b: 3-Eleme... | [
"def",
"vproj",
"(",
"a",
",",
"b",
")",
":",
"a",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"a",
")",
"b",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"b",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vpro... | Find the projection of one vector onto another vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vproj_c.html
:param a: The vector to be projected.
:type a: 3-Element Array of floats
:param b: The vector onto which a is to be projected.
:type b: 3-Element Array of floats
:retur... | [
"Find",
"the",
"projection",
"of",
"one",
"vector",
"onto",
"another",
"vector",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14957-L14974 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vrel | def vrel(v1, v2):
"""
Return the relative difference between two 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrel_c.html
:param v1: First vector
:type v1: 3-Element Array of floats
:param v2: Second vector
:type v2: 3-Element Array of floats
:return... | python | def vrel(v1, v2):
"""
Return the relative difference between two 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrel_c.html
:param v1: First vector
:type v1: 3-Element Array of floats
:param v2: Second vector
:type v2: 3-Element Array of floats
:return... | [
"def",
"vrel",
"(",
"v1",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"return",
"libspice",
".",
"vrel_c",
"(",
"v1",
",",
"v2",
")"
] | Return the relative difference between two 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrel_c.html
:param v1: First vector
:type v1: 3-Element Array of floats
:param v2: Second vector
:type v2: 3-Element Array of floats
:return: the relative difference betw... | [
"Return",
"the",
"relative",
"difference",
"between",
"two",
"3",
"-",
"dimensional",
"vectors",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14978-L14993 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vrelg | def vrelg(v1, v2, ndim):
"""
Return the relative difference between two vectors of general dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrelg_c.html
:param v1: First vector
:type v1: Array of floats
:param v2: Second vector
:type v2: Array of floats
:param ndim:... | python | def vrelg(v1, v2, ndim):
"""
Return the relative difference between two vectors of general dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrelg_c.html
:param v1: First vector
:type v1: Array of floats
:param v2: Second vector
:type v2: Array of floats
:param ndim:... | [
"def",
"vrelg",
"(",
"v1",
",",
"v2",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"return",
... | Return the relative difference between two vectors of general dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrelg_c.html
:param v1: First vector
:type v1: Array of floats
:param v2: Second vector
:type v2: Array of floats
:param ndim: Dimension of v1 and v2.
:type nd... | [
"Return",
"the",
"relative",
"difference",
"between",
"two",
"vectors",
"of",
"general",
"dimension",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14997-L15015 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vrotv | def vrotv(v, axis, theta):
"""
Rotate a vector about a specified axis vector by a
specified angle and return the rotated vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrotv_c.html
:param v: Vector to be rotated.
:type v: 3-Element Array of floats
:param axis: Axis of the... | python | def vrotv(v, axis, theta):
"""
Rotate a vector about a specified axis vector by a
specified angle and return the rotated vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrotv_c.html
:param v: Vector to be rotated.
:type v: 3-Element Array of floats
:param axis: Axis of the... | [
"def",
"vrotv",
"(",
"v",
",",
"axis",
",",
"theta",
")",
":",
"v",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v",
")",
"axis",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"axis",
")",
"theta",
"=",
"ctypes",
".",
"c_double",
"(",
"theta",
")",
"r"... | Rotate a vector about a specified axis vector by a
specified angle and return the rotated vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrotv_c.html
:param v: Vector to be rotated.
:type v: 3-Element Array of floats
:param axis: Axis of the rotation.
:type axis: 3-Element A... | [
"Rotate",
"a",
"vector",
"about",
"a",
"specified",
"axis",
"vector",
"by",
"a",
"specified",
"angle",
"and",
"return",
"the",
"rotated",
"vector",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15019-L15040 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vscl | def vscl(s, v1):
"""
Multiply a scalar and a 3-dimensional double precision vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vscl_c.html
:param s: Scalar to multiply a vector
:type s: float
:param v1: Vector to be multiplied
:type v1: 3-Element Array of floats
:return:... | python | def vscl(s, v1):
"""
Multiply a scalar and a 3-dimensional double precision vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vscl_c.html
:param s: Scalar to multiply a vector
:type s: float
:param v1: Vector to be multiplied
:type v1: 3-Element Array of floats
:return:... | [
"def",
"vscl",
"(",
"s",
",",
"v1",
")",
":",
"s",
"=",
"ctypes",
".",
"c_double",
"(",
"s",
")",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vscl_c",... | Multiply a scalar and a 3-dimensional double precision vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vscl_c.html
:param s: Scalar to multiply a vector
:type s: float
:param v1: Vector to be multiplied
:type v1: 3-Element Array of floats
:return: Product vector, s*v1.
:r... | [
"Multiply",
"a",
"scalar",
"and",
"a",
"3",
"-",
"dimensional",
"double",
"precision",
"vector",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15044-L15061 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vsclg | def vsclg(s, v1, ndim):
"""
Multiply a scalar and a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsclg_c.html
:param s: Scalar to multiply a vector
:type s: float
:param v1: Vector to be multiplied
:type v1: Array of floats
:... | python | def vsclg(s, v1, ndim):
"""
Multiply a scalar and a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsclg_c.html
:param s: Scalar to multiply a vector
:type s: float
:param v1: Vector to be multiplied
:type v1: Array of floats
:... | [
"def",
"vsclg",
"(",
"s",
",",
"v1",
",",
"ndim",
")",
":",
"s",
"=",
"ctypes",
".",
"c_double",
"(",
"s",
")",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"ndim",
")",
"ndim",
... | Multiply a scalar and a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsclg_c.html
:param s: Scalar to multiply a vector
:type s: float
:param v1: Vector to be multiplied
:type v1: Array of floats
:param ndim: Dimension of v1
:ty... | [
"Multiply",
"a",
"scalar",
"and",
"a",
"double",
"precision",
"vector",
"of",
"arbitrary",
"dimension",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15065-L15085 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vsep | def vsep(v1, v2):
"""
Find the separation angle in radians between two double
precision, 3-dimensional vectors. This angle is defined as zero
if either vector is zero.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsep_c.html
:param v1: First vector
:type v1: 3-Element Array of ... | python | def vsep(v1, v2):
"""
Find the separation angle in radians between two double
precision, 3-dimensional vectors. This angle is defined as zero
if either vector is zero.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsep_c.html
:param v1: First vector
:type v1: 3-Element Array of ... | [
"def",
"vsep",
"(",
"v1",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"return",
"libspice",
".",
"vsep_c",
"(",
"v1",
",",
"v2",
")"
] | Find the separation angle in radians between two double
precision, 3-dimensional vectors. This angle is defined as zero
if either vector is zero.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsep_c.html
:param v1: First vector
:type v1: 3-Element Array of floats
:param v2: Second v... | [
"Find",
"the",
"separation",
"angle",
"in",
"radians",
"between",
"two",
"double",
"precision",
"3",
"-",
"dimensional",
"vectors",
".",
"This",
"angle",
"is",
"defined",
"as",
"zero",
"if",
"either",
"vector",
"is",
"zero",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15089-L15106 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vsepg | def vsepg(v1, v2, ndim):
"""
Find the separation angle in radians between two double
precision vectors of arbitrary dimension. This angle is defined
as zero if either vector is zero.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsepg_c.html
:param v1: First vector
:type v1: Arr... | python | def vsepg(v1, v2, ndim):
"""
Find the separation angle in radians between two double
precision vectors of arbitrary dimension. This angle is defined
as zero if either vector is zero.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsepg_c.html
:param v1: First vector
:type v1: Arr... | [
"def",
"vsepg",
"(",
"v1",
",",
"v2",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"return",
... | Find the separation angle in radians between two double
precision vectors of arbitrary dimension. This angle is defined
as zero if either vector is zero.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsepg_c.html
:param v1: First vector
:type v1: Array of floats
:param v2: Second ve... | [
"Find",
"the",
"separation",
"angle",
"in",
"radians",
"between",
"two",
"double",
"precision",
"vectors",
"of",
"arbitrary",
"dimension",
".",
"This",
"angle",
"is",
"defined",
"as",
"zero",
"if",
"either",
"vector",
"is",
"zero",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15110-L15130 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vsub | def vsub(v1, v2):
"""
Compute the difference between two 3-dimensional,
double precision vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsub_c.html
:param v1: First vector (minuend).
:type v1: 3-Element Array of floats
:param v2: Second vector (subtrahend).
:type v2... | python | def vsub(v1, v2):
"""
Compute the difference between two 3-dimensional,
double precision vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsub_c.html
:param v1: First vector (minuend).
:type v1: 3-Element Array of floats
:param v2: Second vector (subtrahend).
:type v2... | [
"def",
"vsub",
"(",
"v1",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
... | Compute the difference between two 3-dimensional,
double precision vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsub_c.html
:param v1: First vector (minuend).
:type v1: 3-Element Array of floats
:param v2: Second vector (subtrahend).
:type v2: 3-Element Array of floats
... | [
"Compute",
"the",
"difference",
"between",
"two",
"3",
"-",
"dimensional",
"double",
"precision",
"vectors",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15134-L15152 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vsubg | def vsubg(v1, v2, ndim):
"""
Compute the difference between two double precision
vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsubg_c.html
:param v1: First vector (minuend).
:type v1: Array of floats
:param v2: Second vector (subtrahend).
:t... | python | def vsubg(v1, v2, ndim):
"""
Compute the difference between two double precision
vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsubg_c.html
:param v1: First vector (minuend).
:type v1: Array of floats
:param v2: Second vector (subtrahend).
:t... | [
"def",
"vsubg",
"(",
"v1",
",",
"v2",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"ndim",
")",
... | Compute the difference between two double precision
vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsubg_c.html
:param v1: First vector (minuend).
:type v1: Array of floats
:param v2: Second vector (subtrahend).
:type v2: Array of floats
:param nd... | [
"Compute",
"the",
"difference",
"between",
"two",
"double",
"precision",
"vectors",
"of",
"arbitrary",
"dimension",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15156-L15177 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vtmv | def vtmv(v1, matrix, v2):
"""
Multiply the transpose of a 3-dimensional column vector
a 3x3 matrix, and a 3-dimensional column vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vtmv_c.html
:param v1: 3 dimensional double precision column vector.
:type v1: 3-Element Array of floa... | python | def vtmv(v1, matrix, v2):
"""
Multiply the transpose of a 3-dimensional column vector
a 3x3 matrix, and a 3-dimensional column vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vtmv_c.html
:param v1: 3 dimensional double precision column vector.
:type v1: 3-Element Array of floa... | [
"def",
"vtmv",
"(",
"v1",
",",
"matrix",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"matrix",
"=",
"stypes",
".",
"toDoubleMatrix",
"(",
"matrix",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
... | Multiply the transpose of a 3-dimensional column vector
a 3x3 matrix, and a 3-dimensional column vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vtmv_c.html
:param v1: 3 dimensional double precision column vector.
:type v1: 3-Element Array of floats
:param matrix: 3x3 double preci... | [
"Multiply",
"the",
"transpose",
"of",
"a",
"3",
"-",
"dimensional",
"column",
"vector",
"a",
"3x3",
"matrix",
"and",
"a",
"3",
"-",
"dimensional",
"column",
"vector",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15181-L15200 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vtmvg | def vtmvg(v1, matrix, v2, nrow, ncol):
"""
Multiply the transpose of a n-dimensional
column vector a nxm matrix,
and a m-dimensional column vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vtmvg_c.html
:param v1: n-dimensional double precision column vector.
:type v1: Array... | python | def vtmvg(v1, matrix, v2, nrow, ncol):
"""
Multiply the transpose of a n-dimensional
column vector a nxm matrix,
and a m-dimensional column vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vtmvg_c.html
:param v1: n-dimensional double precision column vector.
:type v1: Array... | [
"def",
"vtmvg",
"(",
"v1",
",",
"matrix",
",",
"v2",
",",
"nrow",
",",
"ncol",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"matrix",
"=",
"stypes",
".",
"toDoubleMatrix",
"(",
"matrix",
")",
"v2",
"=",
"stypes",
".",
"toDo... | Multiply the transpose of a n-dimensional
column vector a nxm matrix,
and a m-dimensional column vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vtmvg_c.html
:param v1: n-dimensional double precision column vector.
:type v1: Array of floats
:param matrix: nxm double precision ... | [
"Multiply",
"the",
"transpose",
"of",
"a",
"n",
"-",
"dimensional",
"column",
"vector",
"a",
"nxm",
"matrix",
"and",
"a",
"m",
"-",
"dimensional",
"column",
"vector",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15204-L15230 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vupack | def vupack(v):
"""
Unpack three scalar components from a vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vupack_c.html
:param v: Vector
:type v: 3-Element Array of floats
:return: (x, y, z)
:rtype: tuple
"""
v1 = stypes.toDoubleVector(v)
x = ctypes.c_double()
... | python | def vupack(v):
"""
Unpack three scalar components from a vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vupack_c.html
:param v: Vector
:type v: 3-Element Array of floats
:return: (x, y, z)
:rtype: tuple
"""
v1 = stypes.toDoubleVector(v)
x = ctypes.c_double()
... | [
"def",
"vupack",
"(",
"v",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v",
")",
"x",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"y",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"z",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice... | Unpack three scalar components from a vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vupack_c.html
:param v: Vector
:type v: 3-Element Array of floats
:return: (x, y, z)
:rtype: tuple | [
"Unpack",
"three",
"scalar",
"components",
"from",
"a",
"vector",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15234-L15250 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vzero | def vzero(v):
"""
Indicate whether a 3-vector is the zero vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vzero_c.html
:param v: Vector to be tested
:type v: 3-Element Array of floats
:return: true if and only if v is the zero vector
:rtype: bool
"""
v = stypes.toD... | python | def vzero(v):
"""
Indicate whether a 3-vector is the zero vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vzero_c.html
:param v: Vector to be tested
:type v: 3-Element Array of floats
:return: true if and only if v is the zero vector
:rtype: bool
"""
v = stypes.toD... | [
"def",
"vzero",
"(",
"v",
")",
":",
"v",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v",
")",
"return",
"bool",
"(",
"libspice",
".",
"vzero_c",
"(",
"v",
")",
")"
] | Indicate whether a 3-vector is the zero vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vzero_c.html
:param v: Vector to be tested
:type v: 3-Element Array of floats
:return: true if and only if v is the zero vector
:rtype: bool | [
"Indicate",
"whether",
"a",
"3",
"-",
"vector",
"is",
"the",
"zero",
"vector",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15254-L15266 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | vzerog | def vzerog(v, ndim):
"""
Indicate whether a general-dimensional vector is the zero vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vzerog_c.html
:param v: Vector to be tested
:type v: Array of floats
:param ndim: Dimension of v
:type ndim: int
:return: true if and onl... | python | def vzerog(v, ndim):
"""
Indicate whether a general-dimensional vector is the zero vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vzerog_c.html
:param v: Vector to be tested
:type v: Array of floats
:param ndim: Dimension of v
:type ndim: int
:return: true if and onl... | [
"def",
"vzerog",
"(",
"v",
",",
"ndim",
")",
":",
"v",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"return",
"bool",
"(",
"libspice",
".",
"vzerog_c",
"(",
"v",
",",
"ndim",
")",
")"... | Indicate whether a general-dimensional vector is the zero vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vzerog_c.html
:param v: Vector to be tested
:type v: Array of floats
:param ndim: Dimension of v
:type ndim: int
:return: true if and only if v is the zero vector
:rt... | [
"Indicate",
"whether",
"a",
"general",
"-",
"dimensional",
"vector",
"is",
"the",
"zero",
"vector",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15270-L15285 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wncomd | def wncomd(left, right, window):
"""
Determine the complement of a double precision window with
respect to a specified interval.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wncomd_c.html
:param left: left endpoints of complement interval.
:type left: float
:param right: right ... | python | def wncomd(left, right, window):
"""
Determine the complement of a double precision window with
respect to a specified interval.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wncomd_c.html
:param left: left endpoints of complement interval.
:type left: float
:param right: right ... | [
"def",
"wncomd",
"(",
"left",
",",
"right",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"left",
"=",
"ctypes",
".",
"c_double",
"(",
"left",
")",
"... | Determine the complement of a double precision window with
respect to a specified interval.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wncomd_c.html
:param left: left endpoints of complement interval.
:type left: float
:param right: right endpoints of complement interval.
:type ... | [
"Determine",
"the",
"complement",
"of",
"a",
"double",
"precision",
"window",
"with",
"respect",
"to",
"a",
"specified",
"interval",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15310-L15332 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wncond | def wncond(left, right, window):
"""
Contract each of the intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wncond_c.html
:param left: Amount added to each left endpoint.
:type left: float
:param right: Amount subtracted from each right endpoint. ... | python | def wncond(left, right, window):
"""
Contract each of the intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wncond_c.html
:param left: Amount added to each left endpoint.
:type left: float
:param right: Amount subtracted from each right endpoint. ... | [
"def",
"wncond",
"(",
"left",
",",
"right",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"left",
"=",
"ctypes",
".",
"c_double",
"(",
"left",
")",
"... | Contract each of the intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wncond_c.html
:param left: Amount added to each left endpoint.
:type left: float
:param right: Amount subtracted from each right endpoint.
:type right: float
:param window: Wi... | [
"Contract",
"each",
"of",
"the",
"intervals",
"of",
"a",
"double",
"precision",
"window",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15336-L15356 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wndifd | def wndifd(a, b):
"""
Place the difference of two double precision windows into
a third window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wndifd_c.html
:param a: Input window A.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Input window B.
:type b: spiceypy.... | python | def wndifd(a, b):
"""
Place the difference of two double precision windows into
a third window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wndifd_c.html
:param a: Input window A.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Input window B.
:type b: spiceypy.... | [
"def",
"wndifd",
"(",
"a",
",",
"b",
")",
":",
"assert",
"isinstance",
"(",
"a",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"isinstance",
"(",
"b",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"a",
".",
"dtype",
"==",
"1",
"assert",
"b",
".... | Place the difference of two double precision windows into
a third window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wndifd_c.html
:param a: Input window A.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Input window B.
:type b: spiceypy.utils.support_types.SpiceCell
... | [
"Place",
"the",
"difference",
"of",
"two",
"double",
"precision",
"windows",
"into",
"a",
"third",
"window",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15360-L15380 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wnelmd | def wnelmd(point, window):
"""
Determine whether a point is an element of a double precision
window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnelmd_c.html
:param point: Input point.
:type point: float
:param window: Input window
:type window: spiceypy.utils.support_ty... | python | def wnelmd(point, window):
"""
Determine whether a point is an element of a double precision
window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnelmd_c.html
:param point: Input point.
:type point: float
:param window: Input window
:type window: spiceypy.utils.support_ty... | [
"def",
"wnelmd",
"(",
"point",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"point",
"=",
"ctypes",
".",
"c_double",
"(",
"point",
")",
"return",
"boo... | Determine whether a point is an element of a double precision
window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnelmd_c.html
:param point: Input point.
:type point: float
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:return: returns True... | [
"Determine",
"whether",
"a",
"point",
"is",
"an",
"element",
"of",
"a",
"double",
"precision",
"window",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15384-L15401 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wnexpd | def wnexpd(left, right, window):
"""
Expand each of the intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnexpd_c.html
:param left: Amount subtracted from each left endpoint.
:type left: float
:param right: Amount added to each right endpoint.
... | python | def wnexpd(left, right, window):
"""
Expand each of the intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnexpd_c.html
:param left: Amount subtracted from each left endpoint.
:type left: float
:param right: Amount added to each right endpoint.
... | [
"def",
"wnexpd",
"(",
"left",
",",
"right",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"left",
"=",
"ctypes",
".",
"c_double",
"(",
"left",
")",
"... | Expand each of the intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnexpd_c.html
:param left: Amount subtracted from each left endpoint.
:type left: float
:param right: Amount added to each right endpoint.
:type right: float
:param window: Wind... | [
"Expand",
"each",
"of",
"the",
"intervals",
"of",
"a",
"double",
"precision",
"window",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15405-L15425 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wnextd | def wnextd(side, window):
"""
Extract the left or right endpoints from a double precision
window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnextd_c.html
:param side: Extract left "L" or right "R" endpoints.
:type side: str
:param window: Window to be extracted.
:type w... | python | def wnextd(side, window):
"""
Extract the left or right endpoints from a double precision
window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnextd_c.html
:param side: Extract left "L" or right "R" endpoints.
:type side: str
:param window: Window to be extracted.
:type w... | [
"def",
"wnextd",
"(",
"side",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"assert",
"side",
"==",
"'L'",
"or",
"side",
"==",
"'R'",
"side",
"=",
"c... | Extract the left or right endpoints from a double precision
window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnextd_c.html
:param side: Extract left "L" or right "R" endpoints.
:type side: str
:param window: Window to be extracted.
:type window: spiceypy.utils.support_types.Sp... | [
"Extract",
"the",
"left",
"or",
"right",
"endpoints",
"from",
"a",
"double",
"precision",
"window",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15429-L15448 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wnfetd | def wnfetd(window, n):
"""
Fetch a particular interval from a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnfetd_c.html
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:param n: Index of interval to be fetched.
:type n... | python | def wnfetd(window, n):
"""
Fetch a particular interval from a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnfetd_c.html
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:param n: Index of interval to be fetched.
:type n... | [
"def",
"wnfetd",
"(",
"window",
",",
"n",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"n",
")",
"left",
"=",
"ctypes",
".... | Fetch a particular interval from a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnfetd_c.html
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:param n: Index of interval to be fetched.
:type n: int
:return: Left, right endp... | [
"Fetch",
"a",
"particular",
"interval",
"from",
"a",
"double",
"precision",
"window",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15452-L15472 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wnfild | def wnfild(small, window):
"""
Fill small gaps between adjacent intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnfild_c.html
:param small: Limiting measure of small gaps.
:type small: float
:param window: Window to be filled
:type window: ... | python | def wnfild(small, window):
"""
Fill small gaps between adjacent intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnfild_c.html
:param small: Limiting measure of small gaps.
:type small: float
:param window: Window to be filled
:type window: ... | [
"def",
"wnfild",
"(",
"small",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"small",
"=",
"ctypes",
".",
"c_double",
"(",
"small",
")",
"libspice",
".... | Fill small gaps between adjacent intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnfild_c.html
:param small: Limiting measure of small gaps.
:type small: float
:param window: Window to be filled
:type window: spiceypy.utils.support_types.SpiceCell
... | [
"Fill",
"small",
"gaps",
"between",
"adjacent",
"intervals",
"of",
"a",
"double",
"precision",
"window",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15476-L15493 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wnincd | def wnincd(left, right, window):
"""
Determine whether an interval is included in a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnincd_c.html
:param left: Left interval
:type left: float
:param right: Right interval
:type right: float
:param windo... | python | def wnincd(left, right, window):
"""
Determine whether an interval is included in a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnincd_c.html
:param left: Left interval
:type left: float
:param right: Right interval
:type right: float
:param windo... | [
"def",
"wnincd",
"(",
"left",
",",
"right",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"left",
"=",
"ctypes",
".",
"c_double",
"(",
"left",
")",
"... | Determine whether an interval is included in a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnincd_c.html
:param left: Left interval
:type left: float
:param right: Right interval
:type right: float
:param window: Input window
:type window: spiceypy.u... | [
"Determine",
"whether",
"an",
"interval",
"is",
"included",
"in",
"a",
"double",
"precision",
"window",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15518-L15537 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wninsd | def wninsd(left, right, window):
"""
Insert an interval into a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wninsd_c.html
:param left: Left endpoints of new interval.
:type left: float
:param right: Right endpoints of new interval.
:type right: float
... | python | def wninsd(left, right, window):
"""
Insert an interval into a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wninsd_c.html
:param left: Left endpoints of new interval.
:type left: float
:param right: Right endpoints of new interval.
:type right: float
... | [
"def",
"wninsd",
"(",
"left",
",",
"right",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"left",
"=",
"ctypes",
".",
"c_double",
"(",
"left",
")",
"... | Insert an interval into a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wninsd_c.html
:param left: Left endpoints of new interval.
:type left: float
:param right: Right endpoints of new interval.
:type right: float
:param window: Input window.
:type wi... | [
"Insert",
"an",
"interval",
"into",
"a",
"double",
"precision",
"window",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15541-L15558 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wnintd | def wnintd(a, b):
"""
Place the intersection of two double precision windows into
a third window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnintd_c.html
:param a: Input window A.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Input window B.
:type b: spicey... | python | def wnintd(a, b):
"""
Place the intersection of two double precision windows into
a third window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnintd_c.html
:param a: Input window A.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Input window B.
:type b: spicey... | [
"def",
"wnintd",
"(",
"a",
",",
"b",
")",
":",
"assert",
"isinstance",
"(",
"a",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"b",
".",
"dtype",
"==",
"1",
"assert",
"isinstance",
"(",
"b",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"a",
".... | Place the intersection of two double precision windows into
a third window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnintd_c.html
:param a: Input window A.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Input window B.
:type b: spiceypy.utils.support_types.SpiceCe... | [
"Place",
"the",
"intersection",
"of",
"two",
"double",
"precision",
"windows",
"into",
"a",
"third",
"window",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15562-L15583 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wnreld | def wnreld(a, op, b):
"""
Compare two double precision windows.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnreld_c.html
:param a: First window.
:type a: spiceypy.utils.support_types.SpiceCell
:param op: Comparison operator.
:type op: str
:param b: Second window.
:t... | python | def wnreld(a, op, b):
"""
Compare two double precision windows.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnreld_c.html
:param a: First window.
:type a: spiceypy.utils.support_types.SpiceCell
:param op: Comparison operator.
:type op: str
:param b: Second window.
:t... | [
"def",
"wnreld",
"(",
"a",
",",
"op",
",",
"b",
")",
":",
"assert",
"isinstance",
"(",
"a",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"b",
".",
"dtype",
"==",
"1",
"assert",
"isinstance",
"(",
"b",
",",
"stypes",
".",
"SpiceCell",
")",
"asser... | Compare two double precision windows.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnreld_c.html
:param a: First window.
:type a: spiceypy.utils.support_types.SpiceCell
:param op: Comparison operator.
:type op: str
:param b: Second window.
:type b: spiceypy.utils.support_type... | [
"Compare",
"two",
"double",
"precision",
"windows",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15587-L15608 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wnsumd | def wnsumd(window):
"""
Summarize the contents of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnsumd_c.html
:param window: Window to be summarized.
:type window: spiceypy.utils.support_types.SpiceCell
:return:
Total measure of intervals in wi... | python | def wnsumd(window):
"""
Summarize the contents of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnsumd_c.html
:param window: Window to be summarized.
:type window: spiceypy.utils.support_types.SpiceCell
:return:
Total measure of intervals in wi... | [
"def",
"wnsumd",
"(",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"meas",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"avg",
"=",
"ctypes",
".",
"c_double",... | Summarize the contents of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnsumd_c.html
:param window: Window to be summarized.
:type window: spiceypy.utils.support_types.SpiceCell
:return:
Total measure of intervals in window,
Average measur... | [
"Summarize",
"the",
"contents",
"of",
"a",
"double",
"precision",
"window",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15612-L15637 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wnunid | def wnunid(a, b):
"""
Place the union of two double precision windows into a third window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnunid_c.html
:param a: Input window A.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Input window B.
:type b: spiceypy.utils.sup... | python | def wnunid(a, b):
"""
Place the union of two double precision windows into a third window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnunid_c.html
:param a: Input window A.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Input window B.
:type b: spiceypy.utils.sup... | [
"def",
"wnunid",
"(",
"a",
",",
"b",
")",
":",
"assert",
"isinstance",
"(",
"a",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"b",
".",
"dtype",
"==",
"1",
"assert",
"isinstance",
"(",
"b",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"a",
".... | Place the union of two double precision windows into a third window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnunid_c.html
:param a: Input window A.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Input window B.
:type b: spiceypy.utils.support_types.SpiceCell
:retu... | [
"Place",
"the",
"union",
"of",
"two",
"double",
"precision",
"windows",
"into",
"a",
"third",
"window",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15641-L15660 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | wnvald | def wnvald(insize, n, window):
"""
Form a valid double precision window from the contents
of a window array.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnvald_c.html
:param insize: Size of window.
:type insize: int
:param n: Original number of endpoints.
:type n: int
... | python | def wnvald(insize, n, window):
"""
Form a valid double precision window from the contents
of a window array.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnvald_c.html
:param insize: Size of window.
:type insize: int
:param n: Original number of endpoints.
:type n: int
... | [
"def",
"wnvald",
"(",
"insize",
",",
"n",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"insize",
"=",
"ctypes",
".",
"c_int",
"(",
"insize",
")",
"n... | Form a valid double precision window from the contents
of a window array.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnvald_c.html
:param insize: Size of window.
:type insize: int
:param n: Original number of endpoints.
:type n: int
:param window: Input window.
:type wi... | [
"Form",
"a",
"valid",
"double",
"precision",
"window",
"from",
"the",
"contents",
"of",
"a",
"window",
"array",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15664-L15685 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | writln | def writln(line, unit):
"""
Internal undocumented command for writing a text line to a logical unit
No URL available; relevant lines from SPICE source:
FORTRAN SPICE, writln.f::
C$Procedure WRITLN ( Write a text line to a logical unit )
SUBROUTINE WRITLN ( LINE, UNIT )
... | python | def writln(line, unit):
"""
Internal undocumented command for writing a text line to a logical unit
No URL available; relevant lines from SPICE source:
FORTRAN SPICE, writln.f::
C$Procedure WRITLN ( Write a text line to a logical unit )
SUBROUTINE WRITLN ( LINE, UNIT )
... | [
"def",
"writln",
"(",
"line",
",",
"unit",
")",
":",
"lineP",
"=",
"stypes",
".",
"stringToCharP",
"(",
"line",
")",
"unit",
"=",
"ctypes",
".",
"c_int",
"(",
"unit",
")",
"line_len",
"=",
"ctypes",
".",
"c_int",
"(",
"len",
"(",
"line",
")",
")",
... | Internal undocumented command for writing a text line to a logical unit
No URL available; relevant lines from SPICE source:
FORTRAN SPICE, writln.f::
C$Procedure WRITLN ( Write a text line to a logical unit )
SUBROUTINE WRITLN ( LINE, UNIT )
CHARACTER*(*) LINE
... | [
"Internal",
"undocumented",
"command",
"for",
"writing",
"a",
"text",
"line",
"to",
"a",
"logical",
"unit"
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15689-L15720 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | xfmsta | def xfmsta(input_state, input_coord_sys, output_coord_sys, body):
"""
Transform a state between coordinate systems.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xfmsta_c.html
:param input_state: Input state.
:type input_state: 6-Element Array of floats
:param input_coord_sys: Curre... | python | def xfmsta(input_state, input_coord_sys, output_coord_sys, body):
"""
Transform a state between coordinate systems.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xfmsta_c.html
:param input_state: Input state.
:type input_state: 6-Element Array of floats
:param input_coord_sys: Curre... | [
"def",
"xfmsta",
"(",
"input_state",
",",
"input_coord_sys",
",",
"output_coord_sys",
",",
"body",
")",
":",
"input_state",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"input_state",
")",
"input_coord_sys",
"=",
"stypes",
".",
"stringToCharP",
"(",
"input_coord_sys... | Transform a state between coordinate systems.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xfmsta_c.html
:param input_state: Input state.
:type input_state: 6-Element Array of floats
:param input_coord_sys: Current (input) coordinate system.
:type input_coord_sys: str
:param outpu... | [
"Transform",
"a",
"state",
"between",
"coordinate",
"systems",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15774-L15800 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | xpose | def xpose(m):
"""
Transpose a 3x3 matrix
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xpose_c.html
:param m: Matrix to be transposed
:type m: 3x3-Element Array of floats
:return: Transposed matrix
:rtype: 3x3-Element Array of floats
"""
m = stypes.toDoubleMatrix(m)
... | python | def xpose(m):
"""
Transpose a 3x3 matrix
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xpose_c.html
:param m: Matrix to be transposed
:type m: 3x3-Element Array of floats
:return: Transposed matrix
:rtype: 3x3-Element Array of floats
"""
m = stypes.toDoubleMatrix(m)
... | [
"def",
"xpose",
"(",
"m",
")",
":",
"m",
"=",
"stypes",
".",
"toDoubleMatrix",
"(",
"m",
")",
"mout",
"=",
"stypes",
".",
"emptyDoubleMatrix",
"(",
"x",
"=",
"3",
",",
"y",
"=",
"3",
")",
"libspice",
".",
"xpose_c",
"(",
"m",
",",
"mout",
")",
... | Transpose a 3x3 matrix
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xpose_c.html
:param m: Matrix to be transposed
:type m: 3x3-Element Array of floats
:return: Transposed matrix
:rtype: 3x3-Element Array of floats | [
"Transpose",
"a",
"3x3",
"matrix"
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15804-L15818 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | xpose6 | def xpose6(m):
"""
Transpose a 6x6 matrix
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xpose6_c.html
:param m: Matrix to be transposed
:type m: list[6][6]
:return: Transposed matrix
:rtype: list[6][6]
"""
m = stypes.toDoubleMatrix(m)
mout = stypes.emptyDoubleMatrix(... | python | def xpose6(m):
"""
Transpose a 6x6 matrix
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xpose6_c.html
:param m: Matrix to be transposed
:type m: list[6][6]
:return: Transposed matrix
:rtype: list[6][6]
"""
m = stypes.toDoubleMatrix(m)
mout = stypes.emptyDoubleMatrix(... | [
"def",
"xpose6",
"(",
"m",
")",
":",
"m",
"=",
"stypes",
".",
"toDoubleMatrix",
"(",
"m",
")",
"mout",
"=",
"stypes",
".",
"emptyDoubleMatrix",
"(",
"x",
"=",
"6",
",",
"y",
"=",
"6",
")",
"libspice",
".",
"xpose6_c",
"(",
"m",
",",
"mout",
")",
... | Transpose a 6x6 matrix
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xpose6_c.html
:param m: Matrix to be transposed
:type m: list[6][6]
:return: Transposed matrix
:rtype: list[6][6] | [
"Transpose",
"a",
"6x6",
"matrix"
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15822-L15836 | train |
AndrewAnnex/SpiceyPy | spiceypy/spiceypy.py | xposeg | def xposeg(matrix, nrow, ncol):
"""
Transpose a matrix of arbitrary size
in place, the matrix need not be square.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xposeg_c.html
:param matrix: Matrix to be transposed
:type matrix: NxM-Element Array of floats
:param nrow: Number of r... | python | def xposeg(matrix, nrow, ncol):
"""
Transpose a matrix of arbitrary size
in place, the matrix need not be square.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xposeg_c.html
:param matrix: Matrix to be transposed
:type matrix: NxM-Element Array of floats
:param nrow: Number of r... | [
"def",
"xposeg",
"(",
"matrix",
",",
"nrow",
",",
"ncol",
")",
":",
"matrix",
"=",
"stypes",
".",
"toDoubleMatrix",
"(",
"matrix",
")",
"mout",
"=",
"stypes",
".",
"emptyDoubleMatrix",
"(",
"x",
"=",
"ncol",
",",
"y",
"=",
"nrow",
")",
"ncol",
"=",
... | Transpose a matrix of arbitrary size
in place, the matrix need not be square.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xposeg_c.html
:param matrix: Matrix to be transposed
:type matrix: NxM-Element Array of floats
:param nrow: Number of rows of input matrix.
:type nrow: int
... | [
"Transpose",
"a",
"matrix",
"of",
"arbitrary",
"size",
"in",
"place",
"the",
"matrix",
"need",
"not",
"be",
"square",
"."
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15840-L15861 | train |
AndrewAnnex/SpiceyPy | spiceypy/utils/callbacks.py | CallUDFUNS | def CallUDFUNS(f, x):
"""
We are given a UDF CFUNCTYPE and want to call it in python
:param f: SpiceUDFUNS
:type f: CFUNCTYPE
:param x: some scalar
:type x: float
:return: value
:rtype: float
"""
value = c_double()
f(x, byref(value))
return value.value | python | def CallUDFUNS(f, x):
"""
We are given a UDF CFUNCTYPE and want to call it in python
:param f: SpiceUDFUNS
:type f: CFUNCTYPE
:param x: some scalar
:type x: float
:return: value
:rtype: float
"""
value = c_double()
f(x, byref(value))
return value.value | [
"def",
"CallUDFUNS",
"(",
"f",
",",
"x",
")",
":",
"value",
"=",
"c_double",
"(",
")",
"f",
"(",
"x",
",",
"byref",
"(",
"value",
")",
")",
"return",
"value",
".",
"value"
] | We are given a UDF CFUNCTYPE and want to call it in python
:param f: SpiceUDFUNS
:type f: CFUNCTYPE
:param x: some scalar
:type x: float
:return: value
:rtype: float | [
"We",
"are",
"given",
"a",
"UDF",
"CFUNCTYPE",
"and",
"want",
"to",
"call",
"it",
"in",
"python"
] | fc20a9b9de68b58eed5b332f0c051fb343a6e335 | https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/utils/callbacks.py#L158-L171 | train |
mnick/scikit-tensor | sktensor/dedicom.py | Updater.updateD_G | def updateD_G(self, x):
"""
Compute Gradient for update of D
See [2] for derivation of Gradient
"""
self.precompute(x)
g = zeros(len(x))
Ai = zeros(self.A.shape[0])
for i in range(len(g)):
Ai = self.A[:, i]
g[i] = (self.E * (dot(se... | python | def updateD_G(self, x):
"""
Compute Gradient for update of D
See [2] for derivation of Gradient
"""
self.precompute(x)
g = zeros(len(x))
Ai = zeros(self.A.shape[0])
for i in range(len(g)):
Ai = self.A[:, i]
g[i] = (self.E * (dot(se... | [
"def",
"updateD_G",
"(",
"self",
",",
"x",
")",
":",
"self",
".",
"precompute",
"(",
"x",
")",
"g",
"=",
"zeros",
"(",
"len",
"(",
"x",
")",
")",
"Ai",
"=",
"zeros",
"(",
"self",
".",
"A",
".",
"shape",
"[",
"0",
"]",
")",
"for",
"i",
"in",... | Compute Gradient for update of D
See [2] for derivation of Gradient | [
"Compute",
"Gradient",
"for",
"update",
"of",
"D"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/dedicom.py#L226-L239 | train |
mnick/scikit-tensor | sktensor/dedicom.py | Updater.updateD_H | def updateD_H(self, x):
"""
Compute Hessian for update of D
See [2] for derivation of Hessian
"""
self.precompute(x)
H = zeros((len(x), len(x)))
Ai = zeros(self.A.shape[0])
Aj = zeros(Ai.shape)
for i in range(len(x)):
Ai = self.A[:, i]... | python | def updateD_H(self, x):
"""
Compute Hessian for update of D
See [2] for derivation of Hessian
"""
self.precompute(x)
H = zeros((len(x), len(x)))
Ai = zeros(self.A.shape[0])
Aj = zeros(Ai.shape)
for i in range(len(x)):
Ai = self.A[:, i]... | [
"def",
"updateD_H",
"(",
"self",
",",
"x",
")",
":",
"self",
".",
"precompute",
"(",
"x",
")",
"H",
"=",
"zeros",
"(",
"(",
"len",
"(",
"x",
")",
",",
"len",
"(",
"x",
")",
")",
")",
"Ai",
"=",
"zeros",
"(",
"self",
".",
"A",
".",
"shape",
... | Compute Hessian for update of D
See [2] for derivation of Hessian | [
"Compute",
"Hessian",
"for",
"update",
"of",
"D"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/dedicom.py#L241-L269 | train |
mnick/scikit-tensor | sktensor/pyutils.py | is_sequence | def is_sequence(obj):
"""
Helper function to determine sequences
across Python 2.x and 3.x
"""
try:
from collections import Sequence
except ImportError:
from operator import isSequenceType
return isSequenceType(obj)
else:
return isinstance(obj, Sequence) | python | def is_sequence(obj):
"""
Helper function to determine sequences
across Python 2.x and 3.x
"""
try:
from collections import Sequence
except ImportError:
from operator import isSequenceType
return isSequenceType(obj)
else:
return isinstance(obj, Sequence) | [
"def",
"is_sequence",
"(",
"obj",
")",
":",
"try",
":",
"from",
"collections",
"import",
"Sequence",
"except",
"ImportError",
":",
"from",
"operator",
"import",
"isSequenceType",
"return",
"isSequenceType",
"(",
"obj",
")",
"else",
":",
"return",
"isinstance",
... | Helper function to determine sequences
across Python 2.x and 3.x | [
"Helper",
"function",
"to",
"determine",
"sequences",
"across",
"Python",
"2",
".",
"x",
"and",
"3",
".",
"x"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/pyutils.py#L8-L19 | train |
mnick/scikit-tensor | sktensor/pyutils.py | is_number | def is_number(obj):
"""
Helper function to determine numbers
across Python 2.x and 3.x
"""
try:
from numbers import Number
except ImportError:
from operator import isNumberType
return isNumberType(obj)
else:
return isinstance(obj, Number) | python | def is_number(obj):
"""
Helper function to determine numbers
across Python 2.x and 3.x
"""
try:
from numbers import Number
except ImportError:
from operator import isNumberType
return isNumberType(obj)
else:
return isinstance(obj, Number) | [
"def",
"is_number",
"(",
"obj",
")",
":",
"try",
":",
"from",
"numbers",
"import",
"Number",
"except",
"ImportError",
":",
"from",
"operator",
"import",
"isNumberType",
"return",
"isNumberType",
"(",
"obj",
")",
"else",
":",
"return",
"isinstance",
"(",
"obj... | Helper function to determine numbers
across Python 2.x and 3.x | [
"Helper",
"function",
"to",
"determine",
"numbers",
"across",
"Python",
"2",
".",
"x",
"and",
"3",
".",
"x"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/pyutils.py#L22-L33 | train |
mnick/scikit-tensor | sktensor/pyutils.py | func_attr | def func_attr(f, attr):
"""
Helper function to get the attribute of a function
like, name, code, defaults across Python 2.x and 3.x
"""
if hasattr(f, 'func_%s' % attr):
return getattr(f, 'func_%s' % attr)
elif hasattr(f, '__%s__' % attr):
return getattr(f, '__%s__' % attr)
el... | python | def func_attr(f, attr):
"""
Helper function to get the attribute of a function
like, name, code, defaults across Python 2.x and 3.x
"""
if hasattr(f, 'func_%s' % attr):
return getattr(f, 'func_%s' % attr)
elif hasattr(f, '__%s__' % attr):
return getattr(f, '__%s__' % attr)
el... | [
"def",
"func_attr",
"(",
"f",
",",
"attr",
")",
":",
"if",
"hasattr",
"(",
"f",
",",
"'func_%s'",
"%",
"attr",
")",
":",
"return",
"getattr",
"(",
"f",
",",
"'func_%s'",
"%",
"attr",
")",
"elif",
"hasattr",
"(",
"f",
",",
"'__%s__'",
"%",
"attr",
... | Helper function to get the attribute of a function
like, name, code, defaults across Python 2.x and 3.x | [
"Helper",
"function",
"to",
"get",
"the",
"attribute",
"of",
"a",
"function",
"like",
"name",
"code",
"defaults",
"across",
"Python",
"2",
".",
"x",
"and",
"3",
".",
"x"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/pyutils.py#L36-L46 | train |
mnick/scikit-tensor | sktensor/pyutils.py | from_to_without | def from_to_without(frm, to, without, step=1, skip=1, reverse=False, separate=False):
"""
Helper function to create ranges with missing entries
"""
if reverse:
frm, to = (to - 1), (frm - 1)
step *= -1
skip *= -1
a = list(range(frm, without, step))
b = list(range(without +... | python | def from_to_without(frm, to, without, step=1, skip=1, reverse=False, separate=False):
"""
Helper function to create ranges with missing entries
"""
if reverse:
frm, to = (to - 1), (frm - 1)
step *= -1
skip *= -1
a = list(range(frm, without, step))
b = list(range(without +... | [
"def",
"from_to_without",
"(",
"frm",
",",
"to",
",",
"without",
",",
"step",
"=",
"1",
",",
"skip",
"=",
"1",
",",
"reverse",
"=",
"False",
",",
"separate",
"=",
"False",
")",
":",
"if",
"reverse",
":",
"frm",
",",
"to",
"=",
"(",
"to",
"-",
"... | Helper function to create ranges with missing entries | [
"Helper",
"function",
"to",
"create",
"ranges",
"with",
"missing",
"entries"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/pyutils.py#L49-L62 | train |
mnick/scikit-tensor | sktensor/dtensor.py | dtensor.unfold | def unfold(self, mode):
"""
Unfolds a dense tensor in mode n.
Parameters
----------
mode : int
Mode in which tensor is unfolded
Returns
-------
unfolded_dtensor : unfolded_dtensor object
Tensor unfolded along mode
Example... | python | def unfold(self, mode):
"""
Unfolds a dense tensor in mode n.
Parameters
----------
mode : int
Mode in which tensor is unfolded
Returns
-------
unfolded_dtensor : unfolded_dtensor object
Tensor unfolded along mode
Example... | [
"def",
"unfold",
"(",
"self",
",",
"mode",
")",
":",
"sz",
"=",
"array",
"(",
"self",
".",
"shape",
")",
"N",
"=",
"len",
"(",
"sz",
")",
"order",
"=",
"(",
"[",
"mode",
"]",
",",
"from_to_without",
"(",
"N",
"-",
"1",
",",
"-",
"1",
",",
"... | Unfolds a dense tensor in mode n.
Parameters
----------
mode : int
Mode in which tensor is unfolded
Returns
-------
unfolded_dtensor : unfolded_dtensor object
Tensor unfolded along mode
Examples
--------
Create dense tens... | [
"Unfolds",
"a",
"dense",
"tensor",
"in",
"mode",
"n",
"."
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/dtensor.py#L103-L150 | train |
mnick/scikit-tensor | sktensor/utils.py | accum | def accum(subs, vals, func=np.sum, issorted=False, with_subs=False):
"""
NumPy implementation for Matlab's accumarray
"""
# sort accmap for ediff if not sorted
if not issorted:
sidx = lexsort(subs, axis=0)
subs = [sub[sidx] for sub in subs]
vals = vals[sidx]
idx = np.wher... | python | def accum(subs, vals, func=np.sum, issorted=False, with_subs=False):
"""
NumPy implementation for Matlab's accumarray
"""
# sort accmap for ediff if not sorted
if not issorted:
sidx = lexsort(subs, axis=0)
subs = [sub[sidx] for sub in subs]
vals = vals[sidx]
idx = np.wher... | [
"def",
"accum",
"(",
"subs",
",",
"vals",
",",
"func",
"=",
"np",
".",
"sum",
",",
"issorted",
"=",
"False",
",",
"with_subs",
"=",
"False",
")",
":",
"# sort accmap for ediff if not sorted",
"if",
"not",
"issorted",
":",
"sidx",
"=",
"lexsort",
"(",
"su... | NumPy implementation for Matlab's accumarray | [
"NumPy",
"implementation",
"for",
"Matlab",
"s",
"accumarray"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/utils.py#L5-L26 | train |
mnick/scikit-tensor | sktensor/tucker.py | hooi | def hooi(X, rank, **kwargs):
"""
Compute Tucker decomposition of a tensor using Higher-Order Orthogonal
Iterations.
Parameters
----------
X : tensor_mixin
The tensor to be decomposed
rank : array_like
The rank of the decomposition for each mode of the tensor.
The len... | python | def hooi(X, rank, **kwargs):
"""
Compute Tucker decomposition of a tensor using Higher-Order Orthogonal
Iterations.
Parameters
----------
X : tensor_mixin
The tensor to be decomposed
rank : array_like
The rank of the decomposition for each mode of the tensor.
The len... | [
"def",
"hooi",
"(",
"X",
",",
"rank",
",",
"*",
"*",
"kwargs",
")",
":",
"# init options",
"ainit",
"=",
"kwargs",
".",
"pop",
"(",
"'init'",
",",
"__DEF_INIT",
")",
"maxIter",
"=",
"kwargs",
".",
"pop",
"(",
"'maxIter'",
",",
"__DEF_MAXITER",
")",
"... | Compute Tucker decomposition of a tensor using Higher-Order Orthogonal
Iterations.
Parameters
----------
X : tensor_mixin
The tensor to be decomposed
rank : array_like
The rank of the decomposition for each mode of the tensor.
The length of ``rank`` must match the number of ... | [
"Compute",
"Tucker",
"decomposition",
"of",
"a",
"tensor",
"using",
"Higher",
"-",
"Order",
"Orthogonal",
"Iterations",
"."
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/tucker.py#L36-L123 | train |
mnick/scikit-tensor | sktensor/ktensor.py | ktensor.uttkrp | def uttkrp(self, U, mode):
"""
Unfolded tensor times Khatri-Rao product for Kruskal tensors
Parameters
----------
X : tensor_mixin
Tensor whose unfolding should be multiplied.
U : list of array_like
Matrices whose Khatri-Rao product should be mul... | python | def uttkrp(self, U, mode):
"""
Unfolded tensor times Khatri-Rao product for Kruskal tensors
Parameters
----------
X : tensor_mixin
Tensor whose unfolding should be multiplied.
U : list of array_like
Matrices whose Khatri-Rao product should be mul... | [
"def",
"uttkrp",
"(",
"self",
",",
"U",
",",
"mode",
")",
":",
"N",
"=",
"self",
".",
"ndim",
"if",
"mode",
"==",
"1",
":",
"R",
"=",
"U",
"[",
"1",
"]",
".",
"shape",
"[",
"1",
"]",
"else",
":",
"R",
"=",
"U",
"[",
"0",
"]",
".",
"shap... | Unfolded tensor times Khatri-Rao product for Kruskal tensors
Parameters
----------
X : tensor_mixin
Tensor whose unfolding should be multiplied.
U : list of array_like
Matrices whose Khatri-Rao product should be multiplied.
mode : int
Mode in ... | [
"Unfolded",
"tensor",
"times",
"Khatri",
"-",
"Rao",
"product",
"for",
"Kruskal",
"tensors"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/ktensor.py#L84-L111 | train |
mnick/scikit-tensor | sktensor/ktensor.py | ktensor.norm | def norm(self):
"""
Efficient computation of the Frobenius norm for ktensors
Returns
-------
norm : float
Frobenius norm of the ktensor
"""
N = len(self.shape)
coef = outer(self.lmbda, self.lmbda)
for i in range(N):
coef = ... | python | def norm(self):
"""
Efficient computation of the Frobenius norm for ktensors
Returns
-------
norm : float
Frobenius norm of the ktensor
"""
N = len(self.shape)
coef = outer(self.lmbda, self.lmbda)
for i in range(N):
coef = ... | [
"def",
"norm",
"(",
"self",
")",
":",
"N",
"=",
"len",
"(",
"self",
".",
"shape",
")",
"coef",
"=",
"outer",
"(",
"self",
".",
"lmbda",
",",
"self",
".",
"lmbda",
")",
"for",
"i",
"in",
"range",
"(",
"N",
")",
":",
"coef",
"=",
"coef",
"*",
... | Efficient computation of the Frobenius norm for ktensors
Returns
-------
norm : float
Frobenius norm of the ktensor | [
"Efficient",
"computation",
"of",
"the",
"Frobenius",
"norm",
"for",
"ktensors"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/ktensor.py#L113-L126 | train |
mnick/scikit-tensor | sktensor/ktensor.py | ktensor.innerprod | def innerprod(self, X):
"""
Efficient computation of the inner product of a ktensor with another tensor
Parameters
----------
X : tensor_mixin
Tensor to compute the inner product with.
Returns
-------
p : float
Inner product betwe... | python | def innerprod(self, X):
"""
Efficient computation of the inner product of a ktensor with another tensor
Parameters
----------
X : tensor_mixin
Tensor to compute the inner product with.
Returns
-------
p : float
Inner product betwe... | [
"def",
"innerprod",
"(",
"self",
",",
"X",
")",
":",
"N",
"=",
"len",
"(",
"self",
".",
"shape",
")",
"R",
"=",
"len",
"(",
"self",
".",
"lmbda",
")",
"res",
"=",
"0",
"for",
"r",
"in",
"range",
"(",
"R",
")",
":",
"vecs",
"=",
"[",
"]",
... | Efficient computation of the inner product of a ktensor with another tensor
Parameters
----------
X : tensor_mixin
Tensor to compute the inner product with.
Returns
-------
p : float
Inner product between ktensor and X. | [
"Efficient",
"computation",
"of",
"the",
"inner",
"product",
"of",
"a",
"ktensor",
"with",
"another",
"tensor"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/ktensor.py#L128-L150 | train |
mnick/scikit-tensor | sktensor/ktensor.py | ktensor.toarray | def toarray(self):
"""
Converts a ktensor into a dense multidimensional ndarray
Returns
-------
arr : np.ndarray
Fully computed multidimensional array whose shape matches
the original ktensor.
"""
A = dot(self.lmbda, khatrirao(tuple(self.U... | python | def toarray(self):
"""
Converts a ktensor into a dense multidimensional ndarray
Returns
-------
arr : np.ndarray
Fully computed multidimensional array whose shape matches
the original ktensor.
"""
A = dot(self.lmbda, khatrirao(tuple(self.U... | [
"def",
"toarray",
"(",
"self",
")",
":",
"A",
"=",
"dot",
"(",
"self",
".",
"lmbda",
",",
"khatrirao",
"(",
"tuple",
"(",
"self",
".",
"U",
")",
")",
".",
"T",
")",
"return",
"A",
".",
"reshape",
"(",
"self",
".",
"shape",
")"
] | Converts a ktensor into a dense multidimensional ndarray
Returns
-------
arr : np.ndarray
Fully computed multidimensional array whose shape matches
the original ktensor. | [
"Converts",
"a",
"ktensor",
"into",
"a",
"dense",
"multidimensional",
"ndarray"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/ktensor.py#L152-L163 | train |
mnick/scikit-tensor | sktensor/sptensor.py | fromarray | def fromarray(A):
"""Create a sptensor from a dense numpy array"""
subs = np.nonzero(A)
vals = A[subs]
return sptensor(subs, vals, shape=A.shape, dtype=A.dtype) | python | def fromarray(A):
"""Create a sptensor from a dense numpy array"""
subs = np.nonzero(A)
vals = A[subs]
return sptensor(subs, vals, shape=A.shape, dtype=A.dtype) | [
"def",
"fromarray",
"(",
"A",
")",
":",
"subs",
"=",
"np",
".",
"nonzero",
"(",
"A",
")",
"vals",
"=",
"A",
"[",
"subs",
"]",
"return",
"sptensor",
"(",
"subs",
",",
"vals",
",",
"shape",
"=",
"A",
".",
"shape",
",",
"dtype",
"=",
"A",
".",
"... | Create a sptensor from a dense numpy array | [
"Create",
"a",
"sptensor",
"from",
"a",
"dense",
"numpy",
"array"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/sptensor.py#L362-L366 | train |
mnick/scikit-tensor | sktensor/sptensor.py | sptensor._ttm_me_compute | def _ttm_me_compute(self, V, edims, sdims, transp):
"""
Assume Y = T x_i V_i for i = 1...n can fit into memory
"""
shapeY = np.copy(self.shape)
# Determine size of Y
for n in np.union1d(edims, sdims):
shapeY[n] = V[n].shape[1] if transp else V[n].shape[0]
... | python | def _ttm_me_compute(self, V, edims, sdims, transp):
"""
Assume Y = T x_i V_i for i = 1...n can fit into memory
"""
shapeY = np.copy(self.shape)
# Determine size of Y
for n in np.union1d(edims, sdims):
shapeY[n] = V[n].shape[1] if transp else V[n].shape[0]
... | [
"def",
"_ttm_me_compute",
"(",
"self",
",",
"V",
",",
"edims",
",",
"sdims",
",",
"transp",
")",
":",
"shapeY",
"=",
"np",
".",
"copy",
"(",
"self",
".",
"shape",
")",
"# Determine size of Y",
"for",
"n",
"in",
"np",
".",
"union1d",
"(",
"edims",
","... | Assume Y = T x_i V_i for i = 1...n can fit into memory | [
"Assume",
"Y",
"=",
"T",
"x_i",
"V_i",
"for",
"i",
"=",
"1",
"...",
"n",
"can",
"fit",
"into",
"memory"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/sptensor.py#L179-L195 | train |
mnick/scikit-tensor | sktensor/sptensor.py | sptensor.transpose | def transpose(self, axes=None):
"""
Compute transpose of sparse tensors.
Parameters
----------
axes : array_like of ints, optional
Permute the axes according to the values given.
Returns
-------
d : dtensor
dtensor with axes permu... | python | def transpose(self, axes=None):
"""
Compute transpose of sparse tensors.
Parameters
----------
axes : array_like of ints, optional
Permute the axes according to the values given.
Returns
-------
d : dtensor
dtensor with axes permu... | [
"def",
"transpose",
"(",
"self",
",",
"axes",
"=",
"None",
")",
":",
"if",
"axes",
"is",
"None",
":",
"raise",
"NotImplementedError",
"(",
"'Sparse tensor transposition without axes argument is not supported'",
")",
"nsubs",
"=",
"tuple",
"(",
"[",
"self",
".",
... | Compute transpose of sparse tensors.
Parameters
----------
axes : array_like of ints, optional
Permute the axes according to the values given.
Returns
-------
d : dtensor
dtensor with axes permuted. | [
"Compute",
"transpose",
"of",
"sparse",
"tensors",
"."
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/sptensor.py#L232-L252 | train |
mnick/scikit-tensor | sktensor/sptensor.py | sptensor.concatenate | def concatenate(self, tpl, axis=None):
"""
Concatenates sparse tensors.
Parameters
----------
tpl : tuple of sparse tensors
Tensors to be concatenated.
axis : int, optional
Axis along which concatenation should take place
"""
if ... | python | def concatenate(self, tpl, axis=None):
"""
Concatenates sparse tensors.
Parameters
----------
tpl : tuple of sparse tensors
Tensors to be concatenated.
axis : int, optional
Axis along which concatenation should take place
"""
if ... | [
"def",
"concatenate",
"(",
"self",
",",
"tpl",
",",
"axis",
"=",
"None",
")",
":",
"if",
"axis",
"is",
"None",
":",
"raise",
"NotImplementedError",
"(",
"'Sparse tensor concatenation without axis argument is not supported'",
")",
"T",
"=",
"self",
"for",
"i",
"i... | Concatenates sparse tensors.
Parameters
----------
tpl : tuple of sparse tensors
Tensors to be concatenated.
axis : int, optional
Axis along which concatenation should take place | [
"Concatenates",
"sparse",
"tensors",
"."
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/sptensor.py#L254-L272 | train |
mnick/scikit-tensor | sktensor/sptensor.py | unfolded_sptensor.fold | def fold(self):
"""
Recreate original tensor by folding unfolded_sptensor according toc
``ten_shape``.
Returns
-------
T : sptensor
Sparse tensor that is created by refolding according to ``ten_shape``.
"""
nsubs = zeros((len(self.data), len(s... | python | def fold(self):
"""
Recreate original tensor by folding unfolded_sptensor according toc
``ten_shape``.
Returns
-------
T : sptensor
Sparse tensor that is created by refolding according to ``ten_shape``.
"""
nsubs = zeros((len(self.data), len(s... | [
"def",
"fold",
"(",
"self",
")",
":",
"nsubs",
"=",
"zeros",
"(",
"(",
"len",
"(",
"self",
".",
"data",
")",
",",
"len",
"(",
"self",
".",
"ten_shape",
")",
")",
",",
"dtype",
"=",
"np",
".",
"int",
")",
"if",
"len",
"(",
"self",
".",
"rdims"... | Recreate original tensor by folding unfolded_sptensor according toc
``ten_shape``.
Returns
-------
T : sptensor
Sparse tensor that is created by refolding according to ``ten_shape``. | [
"Recreate",
"original",
"tensor",
"by",
"folding",
"unfolded_sptensor",
"according",
"toc",
"ten_shape",
"."
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/sptensor.py#L339-L359 | train |
mnick/scikit-tensor | sktensor/rescal.py | _updateA | def _updateA(X, A, R, P, Z, lmbdaA, orthogonalize):
"""Update step for A"""
n, rank = A.shape
F = zeros((n, rank), dtype=A.dtype)
E = zeros((rank, rank), dtype=A.dtype)
AtA = dot(A.T, A)
for i in range(len(X)):
F += X[i].dot(dot(A, R[i].T)) + X[i].T.dot(dot(A, R[i]))
E += dot(R... | python | def _updateA(X, A, R, P, Z, lmbdaA, orthogonalize):
"""Update step for A"""
n, rank = A.shape
F = zeros((n, rank), dtype=A.dtype)
E = zeros((rank, rank), dtype=A.dtype)
AtA = dot(A.T, A)
for i in range(len(X)):
F += X[i].dot(dot(A, R[i].T)) + X[i].T.dot(dot(A, R[i]))
E += dot(R... | [
"def",
"_updateA",
"(",
"X",
",",
"A",
",",
"R",
",",
"P",
",",
"Z",
",",
"lmbdaA",
",",
"orthogonalize",
")",
":",
"n",
",",
"rank",
"=",
"A",
".",
"shape",
"F",
"=",
"zeros",
"(",
"(",
"n",
",",
"rank",
")",
",",
"dtype",
"=",
"A",
".",
... | Update step for A | [
"Update",
"step",
"for",
"A"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/rescal.py#L212-L234 | train |
mnick/scikit-tensor | sktensor/rescal.py | _compute_fval | def _compute_fval(X, A, R, P, Z, lmbdaA, lmbdaR, lmbdaZ, normX):
"""Compute fit for full slices"""
f = lmbdaA * norm(A) ** 2
for i in range(len(X)):
ARAt = dot(A, dot(R[i], A.T))
f += (norm(X[i] - ARAt) ** 2) / normX[i] + lmbdaR * norm(R[i]) ** 2
return f | python | def _compute_fval(X, A, R, P, Z, lmbdaA, lmbdaR, lmbdaZ, normX):
"""Compute fit for full slices"""
f = lmbdaA * norm(A) ** 2
for i in range(len(X)):
ARAt = dot(A, dot(R[i], A.T))
f += (norm(X[i] - ARAt) ** 2) / normX[i] + lmbdaR * norm(R[i]) ** 2
return f | [
"def",
"_compute_fval",
"(",
"X",
",",
"A",
",",
"R",
",",
"P",
",",
"Z",
",",
"lmbdaA",
",",
"lmbdaR",
",",
"lmbdaZ",
",",
"normX",
")",
":",
"f",
"=",
"lmbdaA",
"*",
"norm",
"(",
"A",
")",
"**",
"2",
"for",
"i",
"in",
"range",
"(",
"len",
... | Compute fit for full slices | [
"Compute",
"fit",
"for",
"full",
"slices"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/rescal.py#L268-L274 | train |
mnick/scikit-tensor | sktensor/cp.py | als | def als(X, rank, **kwargs):
"""
Alternating least-sqaures algorithm to compute the CP decomposition.
Parameters
----------
X : tensor_mixin
The tensor to be decomposed.
rank : int
Tensor rank of the decomposition.
init : {'random', 'nvecs'}, optional
The initializati... | python | def als(X, rank, **kwargs):
"""
Alternating least-sqaures algorithm to compute the CP decomposition.
Parameters
----------
X : tensor_mixin
The tensor to be decomposed.
rank : int
Tensor rank of the decomposition.
init : {'random', 'nvecs'}, optional
The initializati... | [
"def",
"als",
"(",
"X",
",",
"rank",
",",
"*",
"*",
"kwargs",
")",
":",
"# init options",
"ainit",
"=",
"kwargs",
".",
"pop",
"(",
"'init'",
",",
"_DEF_INIT",
")",
"maxiter",
"=",
"kwargs",
".",
"pop",
"(",
"'max_iter'",
",",
"_DEF_MAXITER",
")",
"fi... | Alternating least-sqaures algorithm to compute the CP decomposition.
Parameters
----------
X : tensor_mixin
The tensor to be decomposed.
rank : int
Tensor rank of the decomposition.
init : {'random', 'nvecs'}, optional
The initialization method to use.
- random :... | [
"Alternating",
"least",
"-",
"sqaures",
"algorithm",
"to",
"compute",
"the",
"CP",
"decomposition",
"."
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/cp.py#L46-L171 | train |
mnick/scikit-tensor | sktensor/cp.py | _init | def _init(init, X, N, rank, dtype):
"""
Initialization for CP models
"""
Uinit = [None for _ in range(N)]
if isinstance(init, list):
Uinit = init
elif init == 'random':
for n in range(1, N):
Uinit[n] = array(rand(X.shape[n], rank), dtype=dtype)
elif init == 'nvecs... | python | def _init(init, X, N, rank, dtype):
"""
Initialization for CP models
"""
Uinit = [None for _ in range(N)]
if isinstance(init, list):
Uinit = init
elif init == 'random':
for n in range(1, N):
Uinit[n] = array(rand(X.shape[n], rank), dtype=dtype)
elif init == 'nvecs... | [
"def",
"_init",
"(",
"init",
",",
"X",
",",
"N",
",",
"rank",
",",
"dtype",
")",
":",
"Uinit",
"=",
"[",
"None",
"for",
"_",
"in",
"range",
"(",
"N",
")",
"]",
"if",
"isinstance",
"(",
"init",
",",
"list",
")",
":",
"Uinit",
"=",
"init",
"eli... | Initialization for CP models | [
"Initialization",
"for",
"CP",
"models"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/cp.py#L190-L205 | train |
mnick/scikit-tensor | sktensor/core.py | nvecs | def nvecs(X, n, rank, do_flipsign=True, dtype=np.float):
"""
Eigendecomposition of mode-n unfolding of a tensor
"""
Xn = X.unfold(n)
if issparse_mat(Xn):
Xn = csr_matrix(Xn, dtype=dtype)
Y = Xn.dot(Xn.T)
_, U = eigsh(Y, rank, which='LM')
else:
Y = Xn.dot(Xn.T)
... | python | def nvecs(X, n, rank, do_flipsign=True, dtype=np.float):
"""
Eigendecomposition of mode-n unfolding of a tensor
"""
Xn = X.unfold(n)
if issparse_mat(Xn):
Xn = csr_matrix(Xn, dtype=dtype)
Y = Xn.dot(Xn.T)
_, U = eigsh(Y, rank, which='LM')
else:
Y = Xn.dot(Xn.T)
... | [
"def",
"nvecs",
"(",
"X",
",",
"n",
",",
"rank",
",",
"do_flipsign",
"=",
"True",
",",
"dtype",
"=",
"np",
".",
"float",
")",
":",
"Xn",
"=",
"X",
".",
"unfold",
"(",
"n",
")",
"if",
"issparse_mat",
"(",
"Xn",
")",
":",
"Xn",
"=",
"csr_matrix",... | Eigendecomposition of mode-n unfolding of a tensor | [
"Eigendecomposition",
"of",
"mode",
"-",
"n",
"unfolding",
"of",
"a",
"tensor"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/core.py#L275-L294 | train |
mnick/scikit-tensor | sktensor/core.py | flipsign | def flipsign(U):
"""
Flip sign of factor matrices such that largest magnitude
element will be positive
"""
midx = abs(U).argmax(axis=0)
for i in range(U.shape[1]):
if U[midx[i], i] < 0:
U[:, i] = -U[:, i]
return U | python | def flipsign(U):
"""
Flip sign of factor matrices such that largest magnitude
element will be positive
"""
midx = abs(U).argmax(axis=0)
for i in range(U.shape[1]):
if U[midx[i], i] < 0:
U[:, i] = -U[:, i]
return U | [
"def",
"flipsign",
"(",
"U",
")",
":",
"midx",
"=",
"abs",
"(",
"U",
")",
".",
"argmax",
"(",
"axis",
"=",
"0",
")",
"for",
"i",
"in",
"range",
"(",
"U",
".",
"shape",
"[",
"1",
"]",
")",
":",
"if",
"U",
"[",
"midx",
"[",
"i",
"]",
",",
... | Flip sign of factor matrices such that largest magnitude
element will be positive | [
"Flip",
"sign",
"of",
"factor",
"matrices",
"such",
"that",
"largest",
"magnitude",
"element",
"will",
"be",
"positive"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/core.py#L297-L306 | train |
mnick/scikit-tensor | sktensor/core.py | khatrirao | def khatrirao(A, reverse=False):
"""
Compute the columnwise Khatri-Rao product.
Parameters
----------
A : tuple of ndarrays
Matrices for which the columnwise Khatri-Rao product should be computed
reverse : boolean
Compute Khatri-Rao product in reverse order
Examples
--... | python | def khatrirao(A, reverse=False):
"""
Compute the columnwise Khatri-Rao product.
Parameters
----------
A : tuple of ndarrays
Matrices for which the columnwise Khatri-Rao product should be computed
reverse : boolean
Compute Khatri-Rao product in reverse order
Examples
--... | [
"def",
"khatrirao",
"(",
"A",
",",
"reverse",
"=",
"False",
")",
":",
"if",
"not",
"isinstance",
"(",
"A",
",",
"tuple",
")",
":",
"raise",
"ValueError",
"(",
"'A must be a tuple of array likes'",
")",
"N",
"=",
"A",
"[",
"0",
"]",
".",
"shape",
"[",
... | Compute the columnwise Khatri-Rao product.
Parameters
----------
A : tuple of ndarrays
Matrices for which the columnwise Khatri-Rao product should be computed
reverse : boolean
Compute Khatri-Rao product in reverse order
Examples
--------
>>> A = np.random.randn(5, 2)
... | [
"Compute",
"the",
"columnwise",
"Khatri",
"-",
"Rao",
"product",
"."
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/core.py#L333-L378 | train |
mnick/scikit-tensor | sktensor/core.py | teneye | def teneye(dim, order):
"""
Create tensor with superdiagonal all one, rest zeros
"""
I = zeros(dim ** order)
for f in range(dim):
idd = f
for i in range(1, order):
idd = idd + dim ** (i - 1) * (f - 1)
I[idd] = 1
return I.reshape(ones(order) * dim) | python | def teneye(dim, order):
"""
Create tensor with superdiagonal all one, rest zeros
"""
I = zeros(dim ** order)
for f in range(dim):
idd = f
for i in range(1, order):
idd = idd + dim ** (i - 1) * (f - 1)
I[idd] = 1
return I.reshape(ones(order) * dim) | [
"def",
"teneye",
"(",
"dim",
",",
"order",
")",
":",
"I",
"=",
"zeros",
"(",
"dim",
"**",
"order",
")",
"for",
"f",
"in",
"range",
"(",
"dim",
")",
":",
"idd",
"=",
"f",
"for",
"i",
"in",
"range",
"(",
"1",
",",
"order",
")",
":",
"idd",
"=... | Create tensor with superdiagonal all one, rest zeros | [
"Create",
"tensor",
"with",
"superdiagonal",
"all",
"one",
"rest",
"zeros"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/core.py#L381-L391 | train |
mnick/scikit-tensor | sktensor/core.py | tensor_mixin.ttm | def ttm(self, V, mode=None, transp=False, without=False):
"""
Tensor times matrix product
Parameters
----------
V : M x N array_like or list of M_i x N_i array_likes
Matrix or list of matrices for which the tensor times matrix
products should be performed... | python | def ttm(self, V, mode=None, transp=False, without=False):
"""
Tensor times matrix product
Parameters
----------
V : M x N array_like or list of M_i x N_i array_likes
Matrix or list of matrices for which the tensor times matrix
products should be performed... | [
"def",
"ttm",
"(",
"self",
",",
"V",
",",
"mode",
"=",
"None",
",",
"transp",
"=",
"False",
",",
"without",
"=",
"False",
")",
":",
"if",
"mode",
"is",
"None",
":",
"mode",
"=",
"range",
"(",
"self",
".",
"ndim",
")",
"if",
"isinstance",
"(",
"... | Tensor times matrix product
Parameters
----------
V : M x N array_like or list of M_i x N_i array_likes
Matrix or list of matrices for which the tensor times matrix
products should be performed
mode : int or list of int's, optional
Modes along which t... | [
"Tensor",
"times",
"matrix",
"product"
] | fe517e9661a08164b8d30d2dddf7c96aeeabcf36 | https://github.com/mnick/scikit-tensor/blob/fe517e9661a08164b8d30d2dddf7c96aeeabcf36/sktensor/core.py#L50-L103 | train |
callowayproject/django-categories | categories/registration.py | _process_registry | def _process_registry(registry, call_func):
"""
Given a dictionary, and a registration function, process the registry
"""
from django.core.exceptions import ImproperlyConfigured
from django.apps import apps
for key, value in list(registry.items()):
model = apps.get_model(*key.split('.')... | python | def _process_registry(registry, call_func):
"""
Given a dictionary, and a registration function, process the registry
"""
from django.core.exceptions import ImproperlyConfigured
from django.apps import apps
for key, value in list(registry.items()):
model = apps.get_model(*key.split('.')... | [
"def",
"_process_registry",
"(",
"registry",
",",
"call_func",
")",
":",
"from",
"django",
".",
"core",
".",
"exceptions",
"import",
"ImproperlyConfigured",
"from",
"django",
".",
"apps",
"import",
"apps",
"for",
"key",
",",
"value",
"in",
"list",
"(",
"regi... | Given a dictionary, and a registration function, process the registry | [
"Given",
"a",
"dictionary",
"and",
"a",
"registration",
"function",
"process",
"the",
"registry"
] | 3765851320a79b12c6d3306f3784a2302ea64812 | https://github.com/callowayproject/django-categories/blob/3765851320a79b12c6d3306f3784a2302ea64812/categories/registration.py#L118-L146 | train |
callowayproject/django-categories | categories/migration.py | field_exists | def field_exists(app_name, model_name, field_name):
"""
Does the FK or M2M table exist in the database already?
"""
model = apps.get_model(app_name, model_name)
table_name = model._meta.db_table
cursor = connection.cursor()
field_info = connection.introspection.get_table_description(cursor, ... | python | def field_exists(app_name, model_name, field_name):
"""
Does the FK or M2M table exist in the database already?
"""
model = apps.get_model(app_name, model_name)
table_name = model._meta.db_table
cursor = connection.cursor()
field_info = connection.introspection.get_table_description(cursor, ... | [
"def",
"field_exists",
"(",
"app_name",
",",
"model_name",
",",
"field_name",
")",
":",
"model",
"=",
"apps",
".",
"get_model",
"(",
"app_name",
",",
"model_name",
")",
"table_name",
"=",
"model",
".",
"_meta",
".",
"db_table",
"cursor",
"=",
"connection",
... | Does the FK or M2M table exist in the database already? | [
"Does",
"the",
"FK",
"or",
"M2M",
"table",
"exist",
"in",
"the",
"database",
"already?"
] | 3765851320a79b12c6d3306f3784a2302ea64812 | https://github.com/callowayproject/django-categories/blob/3765851320a79b12c6d3306f3784a2302ea64812/categories/migration.py#L16-L25 | train |
callowayproject/django-categories | categories/migration.py | drop_field | def drop_field(app_name, model_name, field_name):
"""
Drop the given field from the app's model
"""
app_config = apps.get_app_config(app_name)
model = app_config.get_model(model_name)
field = model._meta.get_field(field_name)
with connection.schema_editor() as schema_editor:
schema_e... | python | def drop_field(app_name, model_name, field_name):
"""
Drop the given field from the app's model
"""
app_config = apps.get_app_config(app_name)
model = app_config.get_model(model_name)
field = model._meta.get_field(field_name)
with connection.schema_editor() as schema_editor:
schema_e... | [
"def",
"drop_field",
"(",
"app_name",
",",
"model_name",
",",
"field_name",
")",
":",
"app_config",
"=",
"apps",
".",
"get_app_config",
"(",
"app_name",
")",
"model",
"=",
"app_config",
".",
"get_model",
"(",
"model_name",
")",
"field",
"=",
"model",
".",
... | Drop the given field from the app's model | [
"Drop",
"the",
"given",
"field",
"from",
"the",
"app",
"s",
"model"
] | 3765851320a79b12c6d3306f3784a2302ea64812 | https://github.com/callowayproject/django-categories/blob/3765851320a79b12c6d3306f3784a2302ea64812/categories/migration.py#L28-L36 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.