Thanks for digging into this for me. If focal_val is 16, then this is an
out of bounds error as the matrix is 16x16 and the maximum index can be 15.
What I'm confused about is that focal_val comes from the data which has
been transformed to be restricted to integers in the range of 0-15 (0 -
n_leve
NA,1))
# -2147483648
On Mon, Dec 13, 2021 at 3:43 PM Alex Ilich wrote:
> Thanks for digging into this for me. If focal_val is 16, then this is an
> out of bounds error as the matrix is 16x16 and the maximum index can be 15.
> What I'm confused about is that focal_val comes from the
tions.cpp
R function that calls C++ functions:
https://github.com/ailich/GLCMTextures/blob/terra/R/glcm_textures2.R
On Wed, Dec 15, 2021 at 11:49 AM Dirk Eddelbuettel wrote:
>
> On 15 December 2021 at 11:22, Alex Ilich wrote:
> | I actually think that the issue may be rela
ng integer vector with values 1:21. C_glcm_textures_helper2 seems to
> use this as a C++ subscript -- should it be 0:20? (I did not try to
> analyze the code very closely.)
>
> -Bill
>
> On Wed, Dec 15, 2021 at 9:26 AM Alex Ilich wrote:
>
>> Thanks, I thought I was onto someth
Thanks everyone for helping me figure this out. Within terra::focalCpp
which handles the iteration over small subsets of the data there is a test
iteration that occurs which uses the data that is numbers 1-number of
elements in the window (for a 3x7 window that'd be 1-21). Since the
function I'm us
Hi, I have some code I've written to calculate regression parameters using
ordinarily least squares using RcppArmadillo. This is meant to be performed
iteratively over many small subsets (sliding window over spatial raster
data) so I'd like to automatically detect when the regression can't be
perfo
meric precision issue
Y<- matrix(1:6, ncol=1)
C_OLS(X,Y)
# 0[1] NA NA NA
C_OLS(X2,Y)
# 0[1] NA NA NA
On Fri, Jan 28, 2022 at 11:53 AM Alex Ilich wrote:
> Hi, I have some code I've written to calculate regression parameters using
> ordinarily least squares using RcppArmadillo.
Thanks! I'll use if(rcf <= std::numeric_limits::epsilon()) instead
of rcf==0.
On Fri, Jan 28, 2022 at 7:32 PM Dirk Eddelbuettel wrote:
>
> On 28 January 2022 at 13:25, Alex Ilich wrote:
> | Thank you Neal and Dirk. Based on these comments I think using
> arma::rcond
&g
use if(rcf <= std::numeric_limits::epsilon())
>> instead of rcf==0.
>>
>> On Fri, Jan 28, 2022 at 7:32 PM Dirk Eddelbuettel wrote:
>>
>>>
>>> On 28 January 2022 at 13:25, Alex Ilich wrote:
>>> | Thank you Neal and Dirk. Based on these comments I
Thank you Zé and Dirk! That helped clarify exactly what solve is doing
which I was having trouble tracking down in just the standard docs page.
On Sun, Jan 30, 2022 at 11:26 PM Zé Vinícius wrote:
> Very interesting, Dirk. Thanks!
>
> On Mon, Jan 31, 2022 at 12:18 PM Dirk Eddelbuettel wrote:
>
>
10 matches
Mail list logo