Skip to content

Commit 1a53572

Browse files
committed
Update docs to reflect NDArray support with NumPy dtypes
1 parent c29bce8 commit 1a53572

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/docs/core/data_types.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ This is the list of all basic types supported by CocoIndex:
3636
| LocalDatetime | Date and time without timezone | `cocoindex.LocalDateTime` | `datetime.datetime` |
3737
| OffsetDatetime | Date and time with a timezone offset | `cocoindex.OffsetDateTime` | `datetime.datetime` |
3838
| TimeDelta | A duration of time | `datetime.timedelta` | `datetime.timedelta` |
39-
| Vector[*T*, *Dim*?] | *T* must be basic type. *Dim* is a positive integer and optional. |`cocoindex.Vector[T]` or `cocoindex.Vector[T, Dim]` | `list[T]` |
4039
| Json | | `cocoindex.Json` | Any data convertible to JSON by `json` package |
40+
| Vector[*T*, *Dim*?] | A vector of numbers with type *T* (`np.float32`, `np.float64`, `np.int32`, `np.int64`, `np.uint8`, `np.uint16`, `np.uint32`, or `np.uint64`). *Dim* is a positive integer and optional. | `cocoindex.Vector[T]` or `cocoindex.Vector[T, Dim]` | `numpy.typing.NDArray[T]` or `list[T]` |
4141

4242
Values of all data types can be represented by values in Python's native types (as described under the Native Python Type column).
4343
However, the underlying execution engine and some storage system (like Postgres) has finer distinctions for some types, specifically:

python/cocoindex/functions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import Annotated, Any, TYPE_CHECKING, Literal
44
import numpy as np
55
from numpy.typing import NDArray
6+
import dataclasses
67

78
from .typing import Float32, Vector, TypeAttr
89
from . import op, llm

0 commit comments

Comments
 (0)