Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
  • PyFlink DataFrame
    • DataFrame
    • DataFrame Creation
    • Input/Output
    • SQL
    • Data Types
    • User Defined Functions
    • Configuration
    • Catalog
    • GPU Support
    • AI / LLM
  • PyFlink Multimodal
  • PyFlink DataStream
  • PyFlink Common

pyflink.dataframe.DataType.tensor#

classmethod DataType.tensor(dtype: pyflink.dataframe.datatype.DataType, shape: tuple) → pyflink.dataframe.datatype.DataType[source]#

Fixed-shape tensor type.

Uses the first-class TENSOR logical type so that shape metadata is carried natively by Flink’s type system rather than via a sideband metadata mechanism.

Parameters
  • dtype – Element type, e.g. DataType.float32() or DataType.int8().

  • shape – Shape tuple, e.g. (3, 224, 224). Must be fully specified (no dynamic dimensions).

Example:

>>> DataType.tensor(DataType.float32(), shape=(3, 224, 224))
>>> DataType.tensor(DataType.int8(),    shape=(224, 224, 3))

previous

pyflink.dataframe.DataType.row

next

pyflink.dataframe.DataType.image

Show Source

Created using Sphinx 4.5.0.