Helper function that returns the number of characters per field in a string or unicode array. This is to abstract out the fact that for a unicode array this is itemsize / 4.
(a)
| 87 | return newargs |
| 88 | |
| 89 | def _get_num_chars(a): |
| 90 | """ |
| 91 | Helper function that returns the number of characters per field in |
| 92 | a string or unicode array. This is to abstract out the fact that |
| 93 | for a unicode array this is itemsize / 4. |
| 94 | """ |
| 95 | if issubclass(a.dtype.type, str_): |
| 96 | return a.itemsize // 4 |
| 97 | return a.itemsize |
| 98 | |
| 99 | |
| 100 | def _binary_op_dispatcher(x1, x2): |
no outgoing calls
no test coverage detected