Skip to content

Commit

Permalink
Deployed 4d58d36 to master with MkDocs 1.5.3 and mike 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Apr 8, 2024
1 parent 39ee121 commit 1a4c535
Show file tree
Hide file tree
Showing 34 changed files with 655 additions and 169 deletions.
1 change: 1 addition & 0 deletions master/nimlite/funcs/filter.nim
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ proc filter*(table: nimpy.PyObject, pyExpressions: seq[nimpy.PyObject], filterTy
let pyType = builtins.getTypeName(pyVal)
let obj: PY_ObjectND = (
case pyType
of "NoneType": PY_None
of "int": newPY_Object(pyVal.to(int))
of "float": newPY_Object(pyVal.to(float))
of "bool": newPY_Object(pyVal.to(bool))
Expand Down
Binary file modified master/nimlite/libnimlite.so
Binary file not shown.
79 changes: 57 additions & 22 deletions master/nimlite/numpy.nim
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ type NDArrayTypeDescriptor = enum
D_BOOLEAN
D_INT
D_FLOAT
D_TIME
D_DATE_DAYS
D_TIME_SECONDS
D_TIME_MILISECONDS
D_TIME_MICROSECONDS
D_DATETIME_SECONDS
D_DATETIME_MILISECONDS
D_DATETIME_MICROSECONDS
Expand Down Expand Up @@ -523,16 +525,20 @@ proc consumeDescr(header: var string, header_len: int, offset: var int): NDArray
descriptor = NDArrayTypeDescriptor.D_OBJECT
of 'm':
case dt_descriptor:
of "us": NDArrayTypeDescriptor.D_TIME_MICROSECONDS
of "ms": NDArrayTypeDescriptor.D_TIME_MILISECONDS
of "s": NDArrayTypeDescriptor.D_TIME_SECONDS
else: implement(descr)
of 'M':
case dt_descriptor:
of "D":
size = 8
descriptor = NDArrayTypeDescriptor.D_DATE_DAYS
of "us":
size = 8
descriptor = NDArrayTypeDescriptor.D_DATETIME_MICROSECONDS
else: implement(descr)
size = 8
descriptor = (
case dt_descriptor:
of "D": NDArrayTypeDescriptor.D_DATE_DAYS
of "us": NDArrayTypeDescriptor.D_DATETIME_MICROSECONDS
of "ms": NDArrayTypeDescriptor.D_DATETIME_MILISECONDS
of "s": NDArrayTypeDescriptor.D_DATETIME_SECONDS
else: implement(descr)
)
else:
size = parseInt(descr[type_offset+1..descr.len-1])

Expand Down Expand Up @@ -659,6 +665,33 @@ proc newDateTimeArray_Microseconds(fh: var File, endianness: Endianness, shape:

return DateTimeNDArray(buf: buf, shape: shape)

proc newTimeArray_Seconds(fh: var File, endianness: Endianness, shape: var Shape): ObjectNDArray {.inline.} =
let data = readPrimitiveBuffer[int64](fh, shape)
let dtypes = {K_TIME: data.len}.toTable
let buf = collect:
for v in data:
newPY_Object(seconds2Duration(float v))

return ObjectNDArray(buf: buf, shape: shape, dtypes: dtypes)

proc newTimeArray_Miliseconds(fh: var File, endianness: Endianness, shape: var Shape): ObjectNDArray {.inline.} =
let data = readPrimitiveBuffer[int64](fh, shape)
let dtypes = {K_TIME: data.len}.toTable
let buf = collect:
for v in data:
newPY_Object(seconds2Duration(float v * 1_000))

return ObjectNDArray(buf: buf, shape: shape, dtypes: dtypes)

proc newTimeArray_Microseconds(fh: var File, endianness: Endianness, shape: var Shape): ObjectNDArray {.inline.} =
let data = readPrimitiveBuffer[int64](fh, shape)
let dtypes = {K_TIME: data.len}.toTable
let buf = collect:
for v in data:
newPY_Object(seconds2Duration(float v * 1_000_000))

return ObjectNDArray(buf: buf, shape: shape, dtypes: dtypes)

template newFloatNDArray(fh: var File, endianness: Endianness, size: int, shape: var Shape) =
case size:
of 4: Float32NDArray(buf: readPrimitiveBuffer[float32](fh, shape), shape: shape)
Expand Down Expand Up @@ -711,20 +744,22 @@ proc readPageInfo(fh: var File): (NDArrayDescriptor, bool, Shape) =

proc readNumpy(fh: var File): BaseNDArray =
var ((descrEndianness, descrType, descrSize), _, shape) = readPageInfo(fh)
var page: BaseNDArray

case descrType:
of D_BOOLEAN: page = newBooleanNDArray(fh, shape)
of D_INT: page = newIntNDArray(fh, descrEndianness, descrSize, shape)
of D_FLOAT: page = newFloatNDArray(fh, descrEndianness, descrSize, shape)
of D_UNICODE: page = newUnicodeNDArray(fh, descrEndianness, descrSize, shape)
of D_OBJECT: page = newObjectNDArray(fh, descrEndianness, shape)
of D_DATE_DAYS: page = newDateArray_Days(fh, descrEndianness, shape)
of D_DATETIME_SECONDS: page = newDateTimeArray_Seconds(fh, descrEndianness, shape)
of D_DATETIME_MILISECONDS: page = newDateTimeArray_Miliseconds(fh, descrEndianness, shape)
of D_DATETIME_MICROSECONDS: page = newDateTimeArray_Microseconds(fh, descrEndianness, shape)
else: implement($descrType)

let page = (
case descrType:
of D_BOOLEAN: newBooleanNDArray(fh, shape)
of D_INT: newIntNDArray(fh, descrEndianness, descrSize, shape)
of D_FLOAT: newFloatNDArray(fh, descrEndianness, descrSize, shape)
of D_UNICODE: newUnicodeNDArray(fh, descrEndianness, descrSize, shape)
of D_OBJECT: newObjectNDArray(fh, descrEndianness, shape)
of D_DATE_DAYS: newDateArray_Days(fh, descrEndianness, shape)
of D_DATETIME_SECONDS: newDateTimeArray_Seconds(fh, descrEndianness, shape)
of D_DATETIME_MILISECONDS: newDateTimeArray_Miliseconds(fh, descrEndianness, shape)
of D_DATETIME_MICROSECONDS: newDateTimeArray_Microseconds(fh, descrEndianness, shape)
of D_TIME_SECONDS: newTimeArray_Seconds(fh, descrEndianness, shape)
of D_TIME_MILISECONDS: newTimeArray_Miliseconds(fh, descrEndianness, shape)
of D_TIME_MICROSECONDS: newTimeArray_Microseconds(fh, descrEndianness, shape)
)
return page

proc readNumpy*(path: string): BaseNDArray =
Expand Down
Binary file modified master/objects.inv
Binary file not shown.
4 changes: 2 additions & 2 deletions master/reference/base/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@
<li class="md-nav__item">
<a href="#tablite.base" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;base
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;base
</span>
</a>

Expand Down Expand Up @@ -2191,7 +2191,7 @@
<li class="md-nav__item">
<a href="#tablite.base" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;base
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;base
</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions master/reference/config/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@
<li class="md-nav__item">
<a href="#tablite.config" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;config
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;config
</span>
</a>

Expand Down Expand Up @@ -1333,7 +1333,7 @@
<li class="md-nav__item">
<a href="#tablite.config" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;config
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;config
</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions master/reference/core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@
<li class="md-nav__item">
<a href="#tablite.core" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;core
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;core
</span>
</a>

Expand Down Expand Up @@ -1888,7 +1888,7 @@
<li class="md-nav__item">
<a href="#tablite.core" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;core
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;core
</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions master/reference/datasets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@
<li class="md-nav__item">
<a href="#tablite.datasets" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;datasets
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;datasets
</span>
</a>

Expand Down Expand Up @@ -1153,7 +1153,7 @@
<li class="md-nav__item">
<a href="#tablite.datasets" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;datasets
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;datasets
</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions master/reference/datatypes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
<li class="md-nav__item">
<a href="#tablite.datatypes" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;datatypes
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;datatypes
</span>
</a>

Expand Down Expand Up @@ -1798,7 +1798,7 @@
<li class="md-nav__item">
<a href="#tablite.datatypes" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;datatypes
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;datatypes
</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions master/reference/diff/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@
<li class="md-nav__item">
<a href="#tablite.diff" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;diff
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;diff
</span>
</a>

Expand Down Expand Up @@ -1153,7 +1153,7 @@
<li class="md-nav__item">
<a href="#tablite.diff" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;diff
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;diff
</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions master/reference/export_utils/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@
<li class="md-nav__item">
<a href="#tablite.export_utils" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;export_utils
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;export_utils
</span>
</a>

Expand Down Expand Up @@ -1249,7 +1249,7 @@
<li class="md-nav__item">
<a href="#tablite.export_utils" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;export_utils
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;export_utils
</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions master/reference/file_reader_utils/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@
<li class="md-nav__item">
<a href="#tablite.file_reader_utils" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;file_reader_utils
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;file_reader_utils
</span>
</a>

Expand Down Expand Up @@ -1363,7 +1363,7 @@
<li class="md-nav__item">
<a href="#tablite.file_reader_utils" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;file_reader_utils
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;file_reader_utils
</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions master/reference/groupby_utils/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@
<li class="md-nav__item">
<a href="#tablite.groupby_utils" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;groupby_utils
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;groupby_utils
</span>
</a>

Expand Down Expand Up @@ -1273,7 +1273,7 @@
<li class="md-nav__item">
<a href="#tablite.groupby_utils" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;groupby_utils
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;groupby_utils
</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions master/reference/import_utils/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@
<li class="md-nav__item">
<a href="#tablite.import_utils" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;import_utils
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;import_utils
</span>
</a>

Expand Down Expand Up @@ -1444,7 +1444,7 @@
<li class="md-nav__item">
<a href="#tablite.import_utils" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;import_utils
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;import_utils
</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions master/reference/imputation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@
<li class="md-nav__item">
<a href="#tablite.imputation" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;imputation
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;imputation
</span>
</a>

Expand Down Expand Up @@ -1180,7 +1180,7 @@
<li class="md-nav__item">
<a href="#tablite.imputation" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;imputation
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;imputation
</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions master/reference/joins/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@
<li class="md-nav__item">
<a href="#tablite.joins" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;joins
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;joins
</span>
</a>

Expand Down Expand Up @@ -1189,7 +1189,7 @@
<li class="md-nav__item">
<a href="#tablite.joins" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;joins
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;joins
</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions master/reference/lookup/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@
<li class="md-nav__item">
<a href="#tablite.lookup" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;lookup
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;lookup
</span>
</a>

Expand Down Expand Up @@ -1162,7 +1162,7 @@
<li class="md-nav__item">
<a href="#tablite.lookup" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;lookup
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;lookup
</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions master/reference/match/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@
<li class="md-nav__item">
<a href="#tablite.match" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;match
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;match
</span>
</a>

Expand Down Expand Up @@ -1171,7 +1171,7 @@
<li class="md-nav__item">
<a href="#tablite.match" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;match
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;match
</span>
</a>

Expand Down
4 changes: 2 additions & 2 deletions master/reference/merge/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@
<li class="md-nav__item">
<a href="#tablite.merge" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;merge
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;merge
</span>
</a>

Expand Down Expand Up @@ -1153,7 +1153,7 @@
<li class="md-nav__item">
<a href="#tablite.merge" class="md-nav__link">
<span class="md-ellipsis">
&nbsp;merge
<code class="doc-symbol doc-symbol-toc doc-symbol-module"></code>&nbsp;merge
</span>
</a>

Expand Down
Loading

0 comments on commit 1a4c535

Please sign in to comment.