Skip to content

Internal call to deprecated function should be replaced #200

Description

@hakonanes

Problem

Hi all!

In orix, I can silence all sources of deprecation warnings from 3.4.0 but one: two calls to expandPosition() inside diffpy.structure itself:

sites, ops, mult=expandPosition(spacegroup, xyz, sgoffset, eps)
invariants=_find_invariants(ops)
# shift self.xyz exactly to the special position
ifmult>1:
xyzdups=numpy.array([op(xyz+self.sgoffset) -self.sgoffsetforopininvariants])
dxyz=xyzdups-xyz
dxyz=numpy.mean(dxyz-dxyz.round(), axis=0)
# recalculate if needed
ifnumpy.any(dxyz!=0.0):
self.xyz=xyz+dxyz
self.xyz[numpy.fabs(self.xyz) <self.eps] =0.0
sites, ops, mult=expandPosition(spacegroup, self.xyz, self.sgoffset, eps)

Proposed solution

I propose to replace those two calls with expand_position().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions