Skip to content

MaxBetween panics on a view and scalar #145

@aglyzov

Description

@aglyzov

Here is a minimal demonstration code:

package main

import (
	"fmt"
	"os"

	"gorgonia.org/tensor"
)

func main() {
	a := tensor.New(
		tensor.WithShape(3, 2),
		tensor.WithBacking([]float64{1, 2, 3, 4, 5, 6}),
	)

	x, err := a.Slice(nil, tensor.S(0))
	if err != nil {
		fmt.Println(err)
		os.Exit(2)
	}

	var scalar = float64(3.5)

	_, err = tensor.MaxBetween(x, scalar, tensor.UseUnsafe()) // <-- this panics: "unreachable"
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions