picop.cyarray#
Fast array.array helpers (Cython cpython.array surface).
- picop.cyarray.array_check(p)#
Return True if
pis anarray.array(isinstance).
- picop.cyarray.array_check_exact(p)#
Return True if
type(p) is array.array.
- picop.cyarray.array_clone(template, length, zero=True)#
Return a new array like
templatewithlengthitems.Notes
Optionally zero-fills the new buffer when
zerois true.
- picop.cyarray.array_copy(a)#
Return a shallow copy of
avia Cythonarray.copy.
- picop.cyarray.array_eq(a, b)#
Return True if typed
array.arrayvalues are equal.Notes
Compares typecode/len then
memcmp.
- picop.cyarray.array_extend(self, other)#
Extend
selffromothervia Cythonarray.extend.Notes
Requires the same typecode. Returns
0on success and-1on error; errors raise. Do not use the status int as a bool.
- picop.cyarray.array_ne(a, b)#
Return True if typed
array.arrayvalues differ (not array_eq).
- picop.cyarray.array_resize(a, n)#
Resize
atonelements via Cythonarray.resize.Notes
Returns
0on success and-1on error; errors raise. Do not use the status int as a bool.
- picop.cyarray.array_resize_smart(a, n)#
Resize
atonvia Cythonarray.resize_smart.Notes
Small-grow friendly. Returns
0on success and-1on error; errors raise. Do not use the status int as a bool.