Skip to content

tril and triu fail on 1×1 matrices #1415

Closed
@zackmdavis

Description

@zackmdavis

I just upgraded to my project to use ndarray master in order to be able to use #1386, but discovered that these are failing with thread [test name] has overflowed its stack. (It's a two-dimensional array where both dimensions are 1, perhaps an easy edge-case to overlook.)

I was about to say, "I guess I'm glad I caught this before the eventual 0.16 release", but it looks like 0.16 came out four hours ago?

    #[test]
    fn test_tril() {
        let a: Array2<f32> = Array2::ones((1, 1));
        let b = a.tril(0);
    }

    #[test]
    fn test_triu() {
        let a: Array2<f32> = Array2::ones((1, 1));
        let b = a.triu(0);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions