Skip to content

bynkook/dynamic-numpy-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

dynamic-numpy-array

dynamic 1D & 2D python numpy array
array size expands + (2 x length) when necessary
expands both when you read and write

you can do:

  • create
  • read & write
  • clear(fill with zeros)
  • algebric operations
  • add custom method for specific need

examples:

arr = DynArrNp2d((4,4), "float32")

[[0,0,0,0],
[0,0,0,0],
[0,0,0,0],
[0,0,0,0]]

arr[3:6, 3:6] = 1

[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]

About

1D and 2D dynamic numpy array

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages