π¦ PyKX 3.1.0 Released π¦
Full up-to-date release notes are available here.
π Feature π
- Added support for Python 3.13.
- Added support for NumPy 2.0
- Added support for the creation and management of splayed format databases when using the pykx.DB class.
- Addition of .copy() method for all pykx objects allowing users to modify copied objects without interfering with the original object.
- Addition of reshape keyword to the .np() method of kx.List objects. This can provide two benefits:
a. Conversions of kx.List objects to NumPy by default produce an array of NumPy arrays rather than an N-Dimensional NumPy array. Setting reshape=True when handling N-Dimensional rectangular lists allows the shape to be pre-processed prior to conversion and a more natural N-Dimensional NumPy array to be generated.
>>> kx.q('2 2#4?1f').np(reshape=True)
array([[0.94997503, 0.43908099],
[0.57590514, 0.59190043]])
b. Provide a performance boost when converting regularly shaped (rectangular) N-Dimensional lists of uniform type when the shape of the resulting numpy array is known prior to conversion
>>> import pykx as kx
>>> lst = kx.q('100000 100 10#100000000?1f')
>>> %timeit lst.np()
9.72 s Β± 272 ms per loop (mean Β± std. dev. of 7 runs, 1 loop each)
>>> %timeit lst.np(reshape=[100000, 100, 10])
883ms Β± 19.8 ms per loop (mean Β± std. dev. of 7 runs, 1 loops each)
- Added async_response keyword argument when calling AsyncQConnection objects with reuse=False and wait=False to allow keeping the connection alive until an asynchronous response message has been received.
π§ Fixes & Improvements π§
- Application of the str function on empty PyKX objects could return unexpected results
>>> import pykx as kx
>>> str(kx.q('()!()'))
'()!()'
>>> str(kx.q('()'))
'()'
- When a client attempted to retrieve an object which could not be serialized from a PyKX server it resulted in the client process hanging. An appropriate error is now sent to the client.
- Database generation functionality now allows users to pass any data-type which will convert to a pykx.Table as the table parameter
- Attempting to create a partitioned databases/add a partition to a database with a sym_enum keyword but no by_field would result in a KeyError.
- Using math.inf or -math.inf when creating numeric values now creates equivalent PyKX types
- Fixed a bug where QFuture objects returned by AsyncQConnection objects could block each other unnecessarily.
π Beta Features π
Addition of support in Beta form for conversions between PyKX and PyTorch objects.