~/bend-docscommunity

io.bend checks

raw source on the hub · import bend-ndarray@0.1.3.0/io.bend as Io

bend-ndarray's files: .npy arrays loaded and saved with Base's File effects (npy.bend does the encoding). import bend-ndarray@<version>/io.bend as NIO r : Result<&1, &1, S.NdErr, NP.ND> <- NIO.load("a.npy") w : Result<&1, &1, S.NdErr, Unit> <- NIO.save("b.npy", a)

4 imports
import Base
import ./shape.bend as S
import ./ndarray.bend as NP
import ./npy.bend as NPY

Definitions

def read_done source · line 10 · raw

@r:Pair(File, Result<&1, &1, Pair(U32, String), List<&2, U32>>) -> @+path:String -> IO(Result<&1, &1, 0xcc7fe2a980487676abb11c4601fc801f/shape.NdErr, 0xcc7fe2a980487676abb11c4601fc801f/ndarray.ND>)

def opened_r source · line 21 · raw

@r:Result<&1, &1, Pair(U32, String), File> -> @+path:String -> IO(Result<&1, &1, 0xcc7fe2a980487676abb11c4601fc801f/shape.NdErr, 0xcc7fe2a980487676abb11c4601fc801f/ndarray.ND>)

def load source · line 31 · raw

@+path:String -> IO(Result<&1, &1, 0xcc7fe2a980487676abb11c4601fc801f/shape.NdErr, 0xcc7fe2a980487676abb11c4601fc801f/ndarray.ND>)

the array in the .npy file at path

def write_done source · line 36 · raw

@r:Pair(File, Result<&1, &1, Pair(U32, String), Unit>) -> @+path:String -> IO(Result<&1, &1, 0xcc7fe2a980487676abb11c4601fc801f/shape.NdErr, Unit>)

def opened_w source · line 47 · raw

@r:Result<&1, &1, Pair(U32, String), File> -> @+path:String -> @bs:List<&2, U32> -> IO(Result<&1, &1, 0xcc7fe2a980487676abb11c4601fc801f/shape.NdErr, Unit>)

def save source · line 57 · raw

@+path:String -> @a:0xcc7fe2a980487676abb11c4601fc801f/ndarray.ND -> IO(Result<&1, &1, 0xcc7fe2a980487676abb11c4601fc801f/shape.NdErr, Unit>)

a written to path as a .npy file (version 1.0, its dtype, little-endian, C order)