RobinHankin / spray

sparse arrays and fast multivariate polynomials
https://robinhankin.github.io/spray/
2 stars 2 forks source link

coeffs<-() bug #28

Closed RobinHankin closed 2 years ago

RobinHankin commented 2 years ago
> library(disordR)
Loading required package: digest
> a <- spray(matrix(1:6,2,3))
> coeffs(a) <- disord(c(1,2))
> a
           val
 1 3 5  =    2
 2 4 6  =    1
> 

Above, the last line should not work [the elements 1,2 are not in a well-defined order], but it does. See also https://github.com/RobinHankin/weyl/issues/7

RobinHankin commented 2 years ago

gotta be careful here because changing stopifnot((consistent(coeffs(S),value)) to stopifnot(identical(hash(jj),hash(value)) breaks the stokes package.