GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • cf 3.21.0
  • Introduction
  • Installation
  • Cheat Sheet
  • Recipes using cf
  • Tutorial
  • API reference
  • Aggregation rules
  • Performance
  • Releases
  • Change log
  • Contributing
  • cf classes
  • cf.Data

This view

  • Original page
  • New address

GeezerVison is showing ncas-cms.github.io — cf.Data.array — Documentation

cf.Data.array¶

Data.array¶

A numpy array copy of the data.

In-place changes to the returned numpy array do not affect the underlying Dask array.

The returned numpy array has the same mask hardness and fill values as the data.

Note

If the cf.persist_data function returns True then calling array will persist the underlying lazy Dask array into an equivalent chunked Dask array, but now with the results fully computed and cached memory.

Compare with compute.

Performance

array causes all delayed operations to be computed. The returned numpy array is a deep copy of that returned by created compute.

See also

datetime_array, compute, persist, cf.persist_data

Examples

>>> d = cf.Data([1, 2, 3.0], 'km')
>>> a = d.array
>>> isinstance(a, numpy.ndarray)
True
>>> print(a)
[ 1.  2.  3.]
>>> d[0] = -99
>>> print(a[0])
1.0
>>> a[0] = 88
>>> print(d[0])
-99.0 km
>>> d = cf.Data('2000-12-1', units='days since 1999-12-1')
>>> print(d.array)
366
>>> print(d.datetime_array)
2000-12-01 00:00:00
©2026, NCAS | Page built on 2026-08-28. | Powered by Sphinx 9.1.0 & Alabaster 1.0.0
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.