Using {0, 1, 2} is a valid natural language literal but {-1, 0, 1} is not. I have seen this in https://numpy.org/doc/stable/reference/generated/numpy.linalg.matrix_norm.html: {1, -1, 2, -2, inf, -inf, ‘fro’, ‘nuc’} which might have too many elements in it but is a valid literal type. And in https://numpy.org/doc/stable/reference/generated/numpy.linalg.norm.html: {int, float, inf, -inf, ‘fro’, ‘nuc’} which is clearly not a literal but I figured I'd mention it too.
Using
{0, 1, 2}is a valid natural language literal but{-1, 0, 1}is not. I have seen this in https://numpy.org/doc/stable/reference/generated/numpy.linalg.matrix_norm.html:{1, -1, 2, -2, inf, -inf, ‘fro’, ‘nuc’}which might have too many elements in it but is a valid literal type. And in https://numpy.org/doc/stable/reference/generated/numpy.linalg.norm.html:{int, float, inf, -inf, ‘fro’, ‘nuc’}which is clearly not a literal but I figured I'd mention it too.