strings.pyi 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import numpy as np
  2. import numpy.typing as npt
  3. AR_U: npt.NDArray[np.str_]
  4. AR_S: npt.NDArray[np.bytes_]
  5. np.strings.equal(AR_U, AR_S) # E: incompatible type
  6. np.strings.not_equal(AR_U, AR_S) # E: incompatible type
  7. np.strings.greater_equal(AR_U, AR_S) # E: incompatible type
  8. np.strings.less_equal(AR_U, AR_S) # E: incompatible type
  9. np.strings.greater(AR_U, AR_S) # E: incompatible type
  10. np.strings.less(AR_U, AR_S) # E: incompatible type
  11. np.strings.encode(AR_S) # E: incompatible type
  12. np.strings.decode(AR_U) # E: incompatible type
  13. np.strings.join(AR_U, b"_") # E: incompatible type
  14. np.strings.join(AR_S, "_") # E: incompatible type
  15. np.strings.lstrip(AR_U, b"a") # E: incompatible type
  16. np.strings.lstrip(AR_S, "a") # E: incompatible type
  17. np.strings.strip(AR_U, b"a") # E: incompatible type
  18. np.strings.strip(AR_S, "a") # E: incompatible type
  19. np.strings.rstrip(AR_U, b"a") # E: incompatible type
  20. np.strings.rstrip(AR_S, "a") # E: incompatible type
  21. np.strings.partition(AR_U, b"a") # E: incompatible type
  22. np.strings.partition(AR_S, "a") # E: incompatible type
  23. np.strings.rpartition(AR_U, b"a") # E: incompatible type
  24. np.strings.rpartition(AR_S, "a") # E: incompatible type
  25. np.strings.count(AR_U, b"a", [1, 2, 3], [1, 2, 3]) # E: incompatible type
  26. np.strings.count(AR_S, "a", 0, 9) # E: incompatible type
  27. np.strings.endswith(AR_U, b"a", [1, 2, 3], [1, 2, 3]) # E: incompatible type
  28. np.strings.endswith(AR_S, "a", 0, 9) # E: incompatible type
  29. np.strings.startswith(AR_U, b"a", [1, 2, 3], [1, 2, 3]) # E: incompatible type
  30. np.strings.startswith(AR_S, "a", 0, 9) # E: incompatible type
  31. np.strings.find(AR_U, b"a", [1, 2, 3], [1, 2, 3]) # E: incompatible type
  32. np.strings.find(AR_S, "a", 0, 9) # E: incompatible type
  33. np.strings.rfind(AR_U, b"a", [1, 2, 3], [1, 2 , 3]) # E: incompatible type
  34. np.strings.rfind(AR_S, "a", 0, 9) # E: incompatible type
  35. np.strings.index(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
  36. np.strings.index(AR_S, "a", end=9) # E: incompatible type
  37. np.strings.rindex(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
  38. np.strings.rindex(AR_S, "a", end=9) # E: incompatible type
  39. np.strings.isdecimal(AR_S) # E: incompatible type
  40. np.strings.isnumeric(AR_S) # E: incompatible type
  41. np.strings.replace(AR_U, b"_", b"-", 10) # E: incompatible type
  42. np.strings.replace(AR_S, "_", "-", 1) # E: incompatible type