(adict, align)
| 54 | # a dictionary without "names" and "formats" |
| 55 | # fields is used as a data-type descriptor. |
| 56 | def _usefields(adict, align): |
| 57 | try: |
| 58 | names = adict[-1] |
| 59 | except KeyError: |
| 60 | names = None |
| 61 | if names is None: |
| 62 | names, formats, offsets, titles = _makenames_list(adict, align) |
| 63 | else: |
| 64 | formats = [] |
| 65 | offsets = [] |
| 66 | titles = [] |
| 67 | for name in names: |
| 68 | res = adict[name] |
| 69 | formats.append(res[0]) |
| 70 | offsets.append(res[1]) |
| 71 | if len(res) > 2: |
| 72 | titles.append(res[2]) |
| 73 | else: |
| 74 | titles.append(None) |
| 75 | |
| 76 | return dtype({"names": names, |
| 77 | "formats": formats, |
| 78 | "offsets": offsets, |
| 79 | "titles": titles}, align) |
| 80 | |
| 81 | |
| 82 | # construct an array_protocol descriptor list |
nothing calls this directly
no test coverage detected