Issue #25659: Change assert to TypeError in from_buffer/_copy()

Based on suggestion by Eryk Sun.
3 files changed