char.pyi 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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.char.equal(AR_U, AR_S) # E: incompatible type
  6. np.char.not_equal(AR_U, AR_S) # E: incompatible type
  7. np.char.greater_equal(AR_U, AR_S) # E: incompatible type
  8. np.char.less_equal(AR_U, AR_S) # E: incompatible type
  9. np.char.greater(AR_U, AR_S) # E: incompatible type
  10. np.char.less(AR_U, AR_S) # E: incompatible type
  11. np.char.encode(AR_S) # E: incompatible type
  12. np.char.decode(AR_U) # E: incompatible type
  13. np.char.join(AR_U, b"_") # E: incompatible type
  14. np.char.join(AR_S, "_") # E: incompatible type
  15. np.char.ljust(AR_U, 5, fillchar=b"a") # E: incompatible type
  16. np.char.ljust(AR_S, 5, fillchar="a") # E: incompatible type
  17. np.char.rjust(AR_U, 5, fillchar=b"a") # E: incompatible type
  18. np.char.rjust(AR_S, 5, fillchar="a") # E: incompatible type
  19. np.char.lstrip(AR_U, chars=b"a") # E: incompatible type
  20. np.char.lstrip(AR_S, chars="a") # E: incompatible type
  21. np.char.strip(AR_U, chars=b"a") # E: incompatible type
  22. np.char.strip(AR_S, chars="a") # E: incompatible type
  23. np.char.rstrip(AR_U, chars=b"a") # E: incompatible type
  24. np.char.rstrip(AR_S, chars="a") # E: incompatible type
  25. np.char.partition(AR_U, b"a") # E: incompatible type
  26. np.char.partition(AR_S, "a") # E: incompatible type
  27. np.char.rpartition(AR_U, b"a") # E: incompatible type
  28. np.char.rpartition(AR_S, "a") # E: incompatible type
  29. np.char.replace(AR_U, b"_", b"-") # E: incompatible type
  30. np.char.replace(AR_S, "_", "-") # E: incompatible type
  31. np.char.split(AR_U, b"_") # E: incompatible type
  32. np.char.split(AR_S, "_") # E: incompatible type
  33. np.char.rsplit(AR_U, b"_") # E: incompatible type
  34. np.char.rsplit(AR_S, "_") # E: incompatible type
  35. np.char.count(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
  36. np.char.count(AR_S, "a", end=9) # E: incompatible type
  37. np.char.endswith(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
  38. np.char.endswith(AR_S, "a", end=9) # E: incompatible type
  39. np.char.startswith(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
  40. np.char.startswith(AR_S, "a", end=9) # E: incompatible type
  41. np.char.find(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
  42. np.char.find(AR_S, "a", end=9) # E: incompatible type
  43. np.char.rfind(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
  44. np.char.rfind(AR_S, "a", end=9) # E: incompatible type
  45. np.char.index(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
  46. np.char.index(AR_S, "a", end=9) # E: incompatible type
  47. np.char.rindex(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
  48. np.char.rindex(AR_S, "a", end=9) # E: incompatible type