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