Skip to content

[Err] Hugin library encountered a bus error on macOS. #149

@xuanluoya

Description

@xuanluoya

No excessive error reporting, just simple errors occurred:

Image

The code is vary simple:

open Hugin
open Nx

let () =
  (* Create data: 0 ~ 2π with 100 points *)
  let x = linspace float32 0. (2. *. Float.pi) 100 in
  let y = Nx.sin x in

  (* Create figure and plot *)
  let fig = figure ~width:800 ~height:600 () in
  let ax = subplot fig in
  let _ =
    ax
    |> Plotting.plot ~x ~y ~color:Artist.Color.blue ~label:"sin(x)"
    |> Axes.set_xlabel "x" |> Axes.set_ylabel "y" |> Axes.set_title "Sine Wave"
  in

  (* Display the plot *)
  show fig

There's one more thing to mention, the sample code on the official website seems a bit outdated, which is a pity. I don't have enough technical expertise to contribute code to this project, please the team keep going. It feels truly wonderful to write neural networks with elegant OCaml.

|・ω・`)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions