Return to directory of Todd's CASA extensions

Filters a dictionary so that it only contains keys that are present in a second dictionary.


filterDictionary(completeDict, partialDict)
  • completeDict: the dictionary to filter
  • partialDict: the dictionary whose keys to use in the filter


CASA <2>: spw_info={0: 10, 1: 100, 2:1000}
CASA <3>: au.filterDictionary(spw_info, {0: 'whatever'})
  Out[3]: {0: 10}

-- ToddHunter - 2014-07-24

This topic: ALMA > TWikiUsers > ToddHunter > CasaExtensions > FilterDictionary
Topic revision: 2014-07-25, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback