• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nipy / nibabel / 49 / 4
93%
master: 93%

Build:
DEFAULT BRANCH: master
Ran 14 Jan 2014 10:52PM UTC
Files 128
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Jan 2014 10:24PM UTC coverage: 90.439% (+0.08%) from 90.357%
COVERAGE=--with-coverage

push

travis-ci

matthew-brett
Merge pull request #211 from matthew-brett/add-proxy-slicing

MRG: add proxy slicing

Long awaited API to be able to do arbitrary slicing on array proxies from images.

Meaning, you can slice data from images without loading the whole image from disk.

Of course this can save memory, but it can also be much faster. For an
uncompressed nifti image:

In [17]: timeit img = nib.load(fname1); arr = img.dataobj[..., 120]
1000 loops, best of 3: 1.7 ms per loop

In [19]: timeit img = nib.load(fname1); arr = img.get_data()[..., 120]
1 loops, best of 3: 713 ms per loop
For a gzipped image, the savings depend on the position in the file:

In [8]: timeit img = nib.load(fname); arr = img.dataobj[..., 2]
10 loops, best of 3: 30.7 ms per loop

In [7]: timeit img = nib.load(fname); arr = img.get_data()[..., 2]
1 loops, best of 3: 1.32 s per loop

In [12]: timeit img = nib.load(fname); arr = img.dataobj[..., 40]
1 loops, best of 3: 466 ms per loop

In [11]: timeit img = nib.load(fname); arr = img.get_data()[..., 40]
1 loops, best of 3: 1.31 s per loop

In [13]: timeit img = nib.load(fname); arr = img.dataobj[..., 100]
1 loops, best of 3: 1.15 s per loop

In [14]: timeit img = nib.load(fname); arr = img.dataobj[..., 120]
1 loops, best of 3: 1.38 s per loop

13990 of 15469 relevant lines covered (90.44%)

0.9 hits per line

Source Files on job 49.4 (COVERAGE=--with-coverage)
  • Tree
  • List 0
  • Changed 13
  • Source Changed 12
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 49
  • Travis Job 49.4
  • c36661f2 on github
  • Prev Job for COVERAGE=--with-coverage on master (#46.4)
  • Next Job for COVERAGE=--with-coverage on master (#50.4)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc