interface Person {name: string;age: number;
}interface Song {name: string;age: number;hobbies: string[];
}// 协变
// 这里 Song 是 Person 的子类型,更具体,那么 Song 类型的变量就可以赋值给 Person 类型:
// 这并不会报错ÿ…
最近在新环境中安装了PyTorch 2.4版本,简单测试了import,发现直接报错:
import torchA module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be co…