(str, gdict, ldict)
| 1013 | getI = I.fget |
| 1014 | |
| 1015 | def _from_string(str, gdict, ldict): |
| 1016 | rows = str.split(';') |
| 1017 | rowtup = [] |
| 1018 | for row in rows: |
| 1019 | trow = row.split(',') |
| 1020 | newrow = [] |
| 1021 | for x in trow: |
| 1022 | newrow.extend(x.split()) |
| 1023 | trow = newrow |
| 1024 | coltup = [] |
| 1025 | for col in trow: |
| 1026 | col = col.strip() |
| 1027 | try: |
| 1028 | thismat = ldict[col] |
| 1029 | except KeyError: |
| 1030 | try: |
| 1031 | thismat = gdict[col] |
| 1032 | except KeyError as e: |
| 1033 | raise NameError(f"name {col!r} is not defined") from None |
| 1034 | |
| 1035 | coltup.append(thismat) |
| 1036 | rowtup.append(concatenate(coltup, axis=-1)) |
| 1037 | return concatenate(rowtup, axis=0) |
| 1038 | |
| 1039 | |
| 1040 | @set_module('numpy') |
no test coverage detected
searching dependent graphs…